I made this function, that works the same way as words in Haskell,
words' [] = []
words' str = before : words' (dropWhile isSpace after) where
(before, after) = break isSpace str
and I'm now trying to generalize it so that if I type in:
gWords' "abcbdecefab" "ac" == ["b","bde","ef","b"]
or
gWords' "abc(hjd(hj))jk)k" "()" == ["abc","hjd","hj","jk","k"]