[Haskell-cafe] Pattern Matching

Andrew Coppin andrewcoppin at btinternet.com
Fri Nov 13 04:55:41 EST 2009


Casey Hawthorne wrote:
> Why in a pattern match like
>
> score (1 3) = 7
>
> can I not have
>
> sizeMax = 3
>
> score (1 sizeMax) = 7
>   

If I had a dollar for every time I've written something like

  case msg of
    eVENT_QUIT -> ...
    eVENT_POST -> ...
    eVENT_RESIZE -> ...

and spent an hour trying to figure out why the messages aren't being 
processed right... ;-)



More information about the Haskell-Cafe mailing list