
1 Dec
2005
1 Dec
'05
3:08 p.m.
hi, i'm having this problem, tring to implement split (for learning purposes). Here is one sample of my tries : split _ [] = [] split char (x:xs) | x /= char = x : split char xs | otherwise = [] it is ok i.e. it returns the first of the splits, but I want to get all of the results. str = "testingxsplitxtoxseexhowxitxwork" *Main> split 'x' str "testing" I want : ["testing","split",...] How do i do this.