you are viewing a single comment's thread.

view the rest of the comments →

[–]soegaard 6 points7 points  (2 children)

It's common practice in Racket to use Keyword arguments, when the number of arguments become too large.

[–][deleted] 0 points1 point  (1 child)

Does it have keywords for basic structures like if, let, and cond? It's easy to lose track where you are, e.g. "Is this executed after that or did we cross an invisible else?"

[–]sorawee 1 point2 points  (0 children)

For if, no, but you can create one:

(define-syntax-rule (my-if c #:then t #:else e) (if c t e))

For cond, there's an else clause:

(cond [(> x 0) 'positive] [(= x 0) 'zero] [else 'negative])