Hi Steve,<br><br><span class="gmail_quote">On 12/11/06, <b class="gmail_sendername">Steve Downey</b> <<a href="mailto:sdowney@gmail.com">sdowney@gmail.com</a>> wrote:</span><br>> transforming "one two three four " into " four three two one", how could this be done?
<br><br>This is a good problem for <a href="http://www.cs.uu.nl/%7Edaan/download/parsec/parsec.html">Parsec</a>:<br><br>import Text.ParserCombinators.Parsec<br><br>reverseWords = concat . reverse . split<br> where<br> split = fromRight . parse wordsSpaces ""
<br> fromRight (Right s) = s<br> wordsSpaces = many (many1 space <|> many1 alphaNum)<br><br>-Greg<br>