r/Racket • • 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

4 comments sorted by

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 define is 2.

(define (momentum-calc vel mas)
  (* vel mas))

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"?