Re: [racket-users] [racket ursers] Keyword question

2019-08-23 Thread Philip McGrath
If they do what you want, `curry` and `curryr` support keyword arguments (as of Racket 7.1) and handle lots of cases. If you do need to use `make-keyword-procedure`, you may want to combine it with `procedure-reduce-keyword-arity-mask`. -Philip On Fri, Aug 23, 2019 at 10:03 PM David Storrs wro

Re: [racket-users] [racket ursers] Keyword question

2019-08-23 Thread David Storrs
There's also keyword-apply: https://docs.racket-lang.org/reference/procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._keyword-apply%29%29 (define (f x #:y y #:z

Re: [racket-users] [racket ursers] Keyword question

2019-08-22 Thread Tim Meehan
If it was just passing keyword arguments to your function, you might be able to do it like this: ; https://docs.racket-lang.org/guide/lambda.html ; https://docs.racket-lang.org/reference/procedures.html (define greet (lambda (given #:last surname) (string-append "Hello, " given " " surname)