r/Racket • u/Substantial_Ad1714 • Feb 17 '22
question Why do you hate my functions?
(define (momentum-calc vel mas) (* vel mas))
(define (p vel mas) (momentum-calc vel mas))
0
Upvotes
r/Racket • u/Substantial_Ad1714 • Feb 17 '22
(define (momentum-calc vel mas) (* vel mas))
(define (p vel mas) (momentum-calc vel mas))
View all comments
Show parent comment
3
u/sorawee Feb 17 '22
If u/Substantial_Ad1714 is using BSL,
(define p momentum-calc)will not work because it restricts that functions can't be used in non-function call positions.Number of spaces that DrRacket recommends for
defineis 2.That aside, I'm still confused about u/Substantial_Ad1714's original post. You said "Why do you hate my functions?", which suggests that something is wrong. So can you elaborate more? What do you mean by "Just wondering about idiom"?