[Haskell-cafe] Re: Bathroom reading
ok at cs.otago.ac.nz
Thu Aug 16 20:43:12 EDT 2007
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.
More information about the Haskell-Cafe