
17 Mar
2010
17 Mar
'10
2:03 p.m.
On Wed, Mar 17, 2010 at 10:10:27AM +0100, Heinrich Apfelmus wrote:
Then, you can group the four different cases, noting that they are actually independent of each other: the result is always a concatenation of either [] or [l] with either [] or mywords (tail r)
mywords xs = y ++ ys where (l,r) = span isAlpha xs y = if l == "" then [] else [l] ys = if r == "" then [] else mywords (tail r)
That's a great help - thank you. -- ======================== Roger Whittaker roger@disruptive.org.uk http://disruptive.org.uk ========================