-
Notifications
You must be signed in to change notification settings - Fork 1
Create test.rkt #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
efde74d
19e516c
1f729b7
333a99a
e0c418e
c4cfa54
a36f48c
a3341f2
653092f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||||||||||||||||||||||
| #lang racket/base | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| (define (distance x1 y1 x2 y2) | ||||||||||||||||||||||||||
| (let ([dx (- x1 x2)] | ||||||||||||||||||||||||||
| [dy (- y1 y2)]) | ||||||||||||||||||||||||||
| (sqrt (+ (* dx dx) (* dy dy))))) | ||||||||||||||||||||||||||
jackfirth marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+4
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging details below: Textual replacement(line-replacement
#:new-lines
'#("(define (distance x1 y1 x2 y2)"
" (define dx (- x1 x2))"
" (define dy (- y1 y2))"
" (sqrt (+ (* dx dx) (* dy dy))))")
#:original-lines
'#("(define (distance x1 y1 x2 y2)"
" (let ([dx (- x1 x2)]"
" [dy (- y1 y2)])"
" (sqrt (+ (* dx dx) (* dy dy)))))")
#:start-line 4)Syntactic replacement(syntax-replacement
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.5/pkgs/resyntax/default-recommendations/let-binding-suggestions.rkt:44:3 (define (distance x1 y1 x2 y2) NEWLINE (define dx (- x1 x2)) NEWLINE (define dy (- y1 y2)) NEWLINE (sqrt (+ (* dx dx) (* dy dy))))>
#:original-syntax
#<syntax:test.rkt:4:0 (define (distance x1 y1 x2 y2) (let ((dx (- x1 x2)) (dy (- y1 y2))) (sqrt (+ (* dx dx) (* dy dy)))))>) |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| (or 1 (or 2 3)) | ||||||||||||||||||||||||||
jackfirth marked this conversation as resolved.
Show resolved
Hide resolved
jackfirth marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging details below: Textual replacement(line-replacement
#:new-lines '#("(or 1 2 3)")
#:original-lines '#("(or 1 (or 2 3))")
#:start-line 10)Syntactic replacement(syntax-replacement
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.5/pkgs/resyntax/default-recommendations/boolean-shortcuts.rkt:34:3 (or 1 2 3)>
#:original-syntax #<syntax:test.rkt:10:0 (or 1 (or 2 3))>) |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| (if 'cond 'then (if 'cond2 'then2 'else)) | ||||||||||||||||||||||||||
jackfirth marked this conversation as resolved.
Show resolved
Hide resolved
jackfirth marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging details below: Textual replacement(line-replacement
#:new-lines
'#("(cond" " ['cond 'then]" " ['cond2 'then2]" " [else 'else])")
#:original-lines '#("(if 'cond 'then (if 'cond2 'then2 'else))")
#:start-line 13)Syntactic replacement(syntax-replacement
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.5/pkgs/resyntax/default-recommendations/conditional-shortcuts.rkt:45:3 (cond NEWLINE ((quote cond) (quote then)) NEWLINE ((quote cond2) (quote then2)) NEWLINE (else (quote else)))>
#:original-syntax
#<syntax:test.rkt:13:0 (if (quote cond) (quote then) (if (quote cond2) (quote then2) (quote else)))>) |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| (if 'a | ||||||||||||||||||||||||||
| (println "true branch") | ||||||||||||||||||||||||||
| #f) | ||||||||||||||||||||||||||
jackfirth marked this conversation as resolved.
Show resolved
Hide resolved
jackfirth marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+16
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging details below: Textual replacement(line-replacement
#:new-lines '#("(and 'a" " (println \"true branch\"))")
#:original-lines '#("(if 'a" " (println \"true branch\")" " #f)")
#:start-line 16)Syntactic replacement(syntax-replacement
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.5/pkgs/resyntax/default-recommendations/boolean-shortcuts.rkt:84:3 (and (ORIGINAL-SPLICE (quote a) (println "true branch")))>
#:original-syntax
#<syntax:test.rkt:16:0 (if (quote a) (println "true branch") #f)>) |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| (define some-list (list 1 2 3)) | ||||||||||||||||||||||||||
| (for-each | ||||||||||||||||||||||||||
| (λ (x) | ||||||||||||||||||||||||||
| (displayln x) | ||||||||||||||||||||||||||
| (displayln x)) | ||||||||||||||||||||||||||
| some-list) | ||||||||||||||||||||||||||
jackfirth marked this conversation as resolved.
Show resolved
Hide resolved
jackfirth marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+22
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging details below: Textual replacement(line-replacement
#:new-lines
'#("(for ([x (in-list some-list)])" " (displayln x)" " (displayln x))")
#:original-lines
'#("(for-each"
" (λ (x)"
" (displayln x)"
" (displayln x))"
" some-list)")
#:start-line 22)Syntactic replacement(syntax-replacement
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.5/pkgs/resyntax/default-recommendations/for-loop-shortcuts.rkt:149:3 (for ((x (in-list some-list))) NEWLINE (ORIGINAL-SPLICE (displayln x) (displayln x)))>
#:original-syntax
#<syntax:test.rkt:22:0 (for-each (λ (x) (displayln x) (displayln x)) some-list)>) |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| (define some-list2 (list 3 5 14 10 6 5 2)) | ||||||||||||||||||||||||||
| (ormap | ||||||||||||||||||||||||||
| (λ (x) | ||||||||||||||||||||||||||
| (and (number? x) | ||||||||||||||||||||||||||
| (positive? x) | ||||||||||||||||||||||||||
| (even? x) | ||||||||||||||||||||||||||
| (< x 10))) | ||||||||||||||||||||||||||
| some-list2) | ||||||||||||||||||||||||||
|
Comment on lines
+30
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging details below: Textual replacement(line-replacement
#:new-lines
'#("(for/or ([x (in-list some-list2)])"
" (and (number? x)"
" (positive? x)"
" (even? x)"
" (< x 10)))")
#:original-lines
'#("(ormap"
" (λ (x)"
" (and (number? x)"
" (positive? x)"
" (even? x)"
" (< x 10)))"
" some-list2)")
#:start-line 30)Syntactic replacement(syntax-replacement
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.5/pkgs/resyntax/default-recommendations/for-loop-shortcuts.rkt:158:3 (for/or ((x (in-list some-list2))) NEWLINE (and (number? x) (positive? x) (even? x) (< x 10)))>
#:original-syntax
#<syntax:test.rkt:30:0 (ormap (λ (x) (and (number? x) (positive? x) (even? x) (< x 10))) some-list2)>)
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sorawee fixed 😄 |
||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.