How do I remove a 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:
import Data.List
import Data.List.Split
removePrefix :: Eq t => [t] -> [t] -> Maybe [t]
removePrefix [] [] = Nothing
removePrefix ts [] = Just ts
removePrefix (t:ts) (y:ys) =
if inTnFixOf (y:ys) (t:ts) == True
then SrtipPrefix (y:ys) (t:ts)
else Just [(x:xs)]
Example: input "toyboat" output "boat"
cabal install splitin your terminal; do you want to remove all sublists from a list or only prefixes?