haskell program to remove part of list and print the rest
How do i remove part of a list in haskell. This is what i have done so
far.Please tell me what are the changes that can be made:
enter code here
import Data.Lists
import Data.List.Split
removePrefix :: Eq t => [t] -> [t] => Maybe [t]
removePrefix [][] = Nothing
removePrefix ts[] = Just t's
removePrefix(t:ts)(y:ys) = if inTnFixOf(y:ys)(t:ts) == True
then SrtipPrefix(y:ys)(t:ts)
else Just [(x:xs)]
Example output : input"toyboat" output "boat"
No comments:
Post a Comment