[Haskell] Re: Context of a pattern variable

Tomasz Zielonka tomasz.zielonka at gmail.com
Wed Jan 12 01:51:02 EST 2005


On Tue, Jan 11, 2005 at 06:30:02PM -0500, Stefan Monnier wrote:
> >   case t of
> >       (x, y, z) -> (x, y, z+1)
> 
> How would you do:
> 
>     case t of
>         (x, y, z, a, b, c) -> (x+1, y, z, a, b, c+2)
> 
> would you allow:
> 
>     case t of
>         (ctx @> x, _, _, _, _, ctx @> c) -> ctx (x+1) (c+2)

I thought about it, but not too much. Wolfram's idea seems nice.

Best regards,
Tomasz


More information about the Haskell mailing list