Re: [racket-users] Re: Confused by match

2018-08-16 Thread David Storrs
On Thu, Aug 16, 2018 at 12:08 PM, Alex Gian  wrote:

> Well, it's not often I'm happy when I see a bug, but thank Fog for that.
> Thanks, gfb.
>
> @David K. Storrs.
> I'm not sure your explanation is right, unless it's explaining the bug.
> Surely the two values for 'x' must be the same!
>

Given that the issue is that there's a bug, it's probably just that I don't
understand match as well as I thought I did.  Embarrassing.



>
> On Thursday, August 16, 2018 at 4:45:42 PM UTC+1, gfb wrote:
>>
>> This is an undocumented limitation of match:
>>
>>- issue on github 
>>- issue on github 
>>
>> --
> 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.
>

-- 
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.


[racket-users] Re: Confused by match

2018-08-16 Thread gfb
This is an undocumented limitation of match:

   - issue on github 
   - issue on github 
   

-- 
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.


[racket-users] Re: Confused by match

2018-08-16 Thread Alex Gian
It will work like this

> (match '( b b b b b b )
[(list  x ... y ... )
 #:when (equal? x y)
 (list 'x: x 'y: y)])
'(x: (b b b) y: (b b b))


But does (list  x ... x ... ) not obviate the need for (list  x ... y ... 
)  #:when (equal? x y)   ?

-- 
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.


[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 stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.