[Haskell-cafe] Matching constructors

Jared Updike jupdike at gmail.com
Fri Feb 10 11:46:06 EST 2006

Or inline as

> findIndices (\x -> case x of Tootie _ -> True; _ -> False) listOfPasAndTooties

There was a recent thread about wanting a more succint way to write
this (unary pattern matching):

If John got his wish, then you could write something like
> findIndices (@ Tootie _) listOfPasAndTooties

Maybe this feature will appear in a future Haskell standard? though I
don't see anything on the Haskell' wiki about this...

reverse ")-:"

More information about the Haskell-Cafe mailing list