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
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
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
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)))
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
5 matches
Mail list logo