[racket-users] Re: Confused by match

2018-08-15 Thread Alex Gian
Incidentally, while on the subject of matching, is there a way to coax it into returning ALL the valid matches, either by backtracking or any other method? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and

[racket-users] Confused by match

2018-08-15 Thread Alex Gian
Normally in match... > (match '(a b b b b b b a) [`(,x ,y ... ,x) (list 'x: x 'y: y)]) '(x: a y: (b b b b b b)) > (match '(a b b b b b b d) [`(,x ,y ... ,x) (list 'x: x 'y: y)] [_ 'nope]) 'nope So far, so good. However, in this case: > (match '(a b b b b b b c) [`(a ,x ... ,y

Re: [racket-users] Re: How to resolve phase errors on require/provide for macros

2018-08-15 Thread David Storrs
On Wed, Aug 15, 2018 at 9:22 AM, Matthias Felleisen wrote: > > Also, do take a look at struct/c. > I don't think it covers the same need. It creates a contract that will review a struct after it has been created and identify whether or not it is well-formed, but it will not prevent you from

Re: [racket-users] Re: How to resolve phase errors on require/provide for macros

2018-08-15 Thread David Storrs
Brilliant. This is exactly what I needed, thank you. On Wed, Aug 15, 2018 at 1:31 AM, gfb wrote: > You're losing the binding information by doing syntax->datum. Here's a > quick change to get you unstuck: > > ... >(only-in racket/list partition flatten > append-map)))

Re: [racket-users] Re: How to resolve phase errors on require/provide for macros

2018-08-15 Thread Matthias Felleisen
Also, do take a look at struct/c. > On Aug 15, 2018, at 1:31 AM, gfb wrote: > > You're losing the binding information by doing syntax->datum. Here's a quick > change to get you unstuck: > > ... >(only-in racket/list partition flatten append-map))) ; > Include