Hi Steve,
On 12/11/06, Steve Downey <sdowney@gmail.com> wrote:
> transforming "one two three four " into " four three two one", how could this be done?
This is a good problem for Parsec:
import Text.ParserCombinators.Parsec
reverseWords = concat . reverse . split
where
split = fromRight . parse wordsSpaces ""
fromRight (Right s) = s
wordsSpaces = many (many1 space <|> many1 alphaNum)
-Greg