racket-algebraic icon indicating copy to clipboard operation
racket-algebraic copied to clipboard

add keyword formals to functions

Open dedbox opened this issue 5 years ago • 1 comments

Does this make any sense?

dedbox avatar Apr 29 '19 07:04 dedbox

For functions, this does make sense. In forms like these:

(φ #:k k (add1 k))
(φ* (a #:b b) (+ a b))
(φ* (a #:b [b 0]) (+ a b))

As long as the keyword is not a pattern directive, a keyword in a pattern should always follow a pattern or a pattern+default -value.

dedbox avatar Jun 24 '19 05:06 dedbox