Hi MB That did the trick. Using the macro stepper didnt help much but after running the (message-syntax ...) I see the message object getting populated correctly with field objects. Why is there a difference ?
Thanks p.s pollen is the reason I started learning Racket. Thanks !!!. On Friday, November 11, 2016 at 11:45:26 AM UTC-5, Matthew Butterick wrote: > On Nov 11, 2016, at 7:24 AM, dear chap <dear...@gmail.com> wrote: > (define-syntax (message-syntax stx) > (syntax-parse stx > ([_ name field:field_binding ...] > #`(begin > (define message-inst (message 'name '((field-syntax field) ...))))) > > > I want the message object to contain the name and a list of field objects. > However the object is being created with name and list of (field-syntax > field) objects. I then changed the template to use > > > If so, are you sure you want to create that inner list with `quote`? Does > `list` change the behavior?: > > (define-syntax (message-syntax stx) > (syntax-parse stx > ([_ name field:field_binding ...] > #`(begin > (define message-inst (message 'name (list (field-syntax field) > ...))))) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.