diff --git a/haskell/10_split_strings.hs b/haskell/10_split_strings.hs new file mode 100644 index 0000000..4a69b2a --- /dev/null +++ b/haskell/10_split_strings.hs @@ -0,0 +1,8 @@ +module Codewars.Kata.SplitStrings where + +import qualified Data.Char as Char + +solution :: String -> [String] +solution [] = [] +solution [c1] = [c1 : "_"] +solution (c1:c2:rest) = (c1 : c2 : "") : solution rest