Hi Steve, On 12/11/06, Steve Downey <[EMAIL PROTECTED]> wrote:
transforming "one two three four " into " four three two
one", how could this be done?
This is a good problem for Parsec<http://www.cs.uu.nl/%7Edaan/download/parsec/parsec.html> : import Text.ParserCombinators.Parsec reverseWords = concat . reverse . split where split = fromRight . parse wordsSpaces "" fromRight (Right s) = s wordsSpaces = many (many1 space <|> many1 alphaNum) -Greg
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe