Hello,
Please help me with this:
I'm absolute newbie in Haskell,
I hope I'm posting to right forum.
(1) For "abcdefgh" -> ["ab","cd","ef"]
I figured this out:
foo (x:y:z) = ( (x:y) :(foo z))
Now how generalize this to club 'n' chars instead of two ?
3 -> "abcdefgh" -> ["abc","def","gh"]
i.e. n -> [Char] -> [ [Char] ] -- all except last element
have length == n
(2) My original problem is of splitting by markers.
"a<b>cd<efg>hi" -> [ "a" , "b", "cd", "efg", "hi" ]
I'm at total loss on how to do it.
Any pointer will be appreciated.
--TIA
--Vardhan
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell