On Dec 13, 2006, at 3:54 AM, Yitz Gale wrote:

Nice. Here is something similar:

reverseWords = concat . reverse . groupBy eqsp
  where eqsp x y = isSpace x == isSpace y

This can be made even nicer using the 'on' function [1]:

reverseWords = concat . reverse . groupBy ((==) `on` isSpace)

[1] http://www.haskell.org/pipermail/libraries/2006-November/006156.html

/ Ulf



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

Reply via email to