Christopher,

Wouldn't it be great if pattern variables could be used more than once
in a pattern? Like so:

   foo [x,x,_,x] =  "The values are the same!"
   foo _      = "They're not the same!"

These are called nonlinear patterns. I think Miranda (a precursor of Haskell, sort of) used to have them.

Cheers,

  Stefan
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to