Brandon S. Allbery KF8NH writes: > Off the top of my head, the C++ one translates to: > > *Main> concatMap reverse . groupBy (\l r -> (l == ' ') == (r == ' > ')) . reverse $ "one two three four " > " four three two one" > > There are almost certainly more idiomatic ways to do it, but I'm > still learning.
Nice. Here is something similar: reverseWords = concat . reverse . groupBy eqsp where eqsp x y = isSpace x == isSpace y Regards, Yitz _._ .._. ___.. _. .... _.. . .__ _... ___.. ... _. _._ _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe