Re: [racket-users] Programmatically generating keywords

2016-10-26 Thread David Storrs
Thanks, Sam. That was exactly what I needed. Thanks, Matthas. The example was useful. On Wed, Oct 26, 2016 at 2:13 PM, Sam Tobin-Hochstadt wrote: > I think `keyword-apply` is what you want. > > Sam > > On Wed, Oct 26, 2016 at 2:11 PM, David Storrs

Re: [racket-users] Programmatically generating keywords

2016-10-26 Thread Matthias Felleisen
I just did something like that” ;; [Listof String] -> Week ;; parse a list of strings into a week (define (1-week los) ... (define zipped (map list all-keywords all-vals)) (define sorted (sort zipped keywordkeyword). [[ For completeness, (define-syntax (struct/opt stx)

Re: [racket-users] Programmatically generating keywords

2016-10-26 Thread Sam Tobin-Hochstadt
I think `keyword-apply` is what you want. Sam On Wed, Oct 26, 2016 at 2:11 PM, David Storrs wrote: > Is it possible to generate keywords for a call? > > For example, this works: > > (with-output-to-file > (buildpath "." "foo") > (lambda () (displayln "f!")) >

[racket-users] Programmatically generating keywords

2016-10-26 Thread David Storrs
Is it possible to generate keywords for a call? For example, this works: (with-output-to-file (buildpath "." "foo") (lambda () (displayln "f!")) #:mode 'text #:exists 'replace) But this does not: (with-output-to-file (buildpath "." "foo") (lambda () (displayln "f!"))