(define*
;; function name: hi
;; a is needed
;; b has default argument 32
;; c has default argument "hi"
(hi a (b 32) (c "hi"))
;; just returning the arguments
(list a b c))
(list
(hi 1)
(hi :c 332 :a 3)
(hi 3 2 1))
I'm not sure about the named-arguments, used when calling a function, but allowing default values for parameters seems nice and the syntax is trivial to handle.
I came across this example, recently:
I'm not sure about the named-arguments, used when calling a function, but allowing default values for parameters seems nice and the syntax is trivial to handle.