[Haskell] Re: Context of a pattern variable

Stefan Monnier monnier at iro.umontreal.ca
Tue Jan 11 18:30:02 EST 2005


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


-- Stefan



More information about the Haskell mailing list