Someone mentioned the "Blow your mind" page.
One example there really caught my attention.
 "1234567" => ("1357","246")
 foldr (\a ~(x,y) -> (a:y,x)) ([],[])

I've known about lazy match since an early version of the Haskell
report, but have never actually used it.  Last night, looking at
that example, the lights went on and I finally grokked why it's
there and understood when/why I might use it myself.

Oh, I knew perfectly well what it does.  It just never made itself
at home in my head.

I'd like to recommend this example for some sort of prize, therefore.

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

Reply via email to