Re: [racket-users] One macro -> N defined functions

2018-11-20 Thread Brian Adkins
So simple in hindsight - thanks! I didn't realize begin could be used that way, but it makes perfect sense, and that was the key missing piece for me. On Tuesday, November 20, 2018 at 9:56:08 AM UTC-5, Shu-Hung You wrote: > > The begin form can encapsulate multiple definitions like this: > >

Re: [racket-users] One macro -> N defined functions

2018-11-20 Thread Shu-Hung You
The begin form can encapsulate multiple definitions like this: (require (for-syntax racket/sequence racket/syntax) syntax/parse/define) (define-simple-macro (define-asserts predicate:id ...) #:with (assert-name ...) (for/list ([id (in-syntax #'(predicate ...))])

[racket-users] One macro -> N defined functions

2018-11-20 Thread Brian Adkins
I'm just beginning to dig in to Racket macros, so forgive the newbie question :) Is it possible to create a macro that will result in multiple functions being defined? I have a bunch of predicate functions, and I'm creating a parallel set of assert functions that look like the following: