haskell very newbie question
Posted: Sun Nov 13, 2005 9:48 pm
til :: [String] -> String -> String
til [] s=s
til tks@(c:t) s
|substr c s = til tks (a++B) where (a,B)=split c s (head t)
|otherwise = til (drop 2 tks) s
i don't understand why it says ...syntax error in input (unexpected |')
substr checks if c is a substring of s
i have other functions that look like this and work so i'm completly in the dark here
thx
Archived topic from Iceteks, old topic ID:3953, old post ID:32333
til [] s=s
til tks@(c:t) s
|substr c s = til tks (a++B) where (a,B)=split c s (head t)
|otherwise = til (drop 2 tks) s
i don't understand why it says ...syntax error in input (unexpected |')
substr checks if c is a substring of s
i have other functions that look like this and work so i'm completly in the dark here
thx
Archived topic from Iceteks, old topic ID:3953, old post ID:32333