mykatas/haskell/10_split_strings.hs

9 lines
236 B
Haskell
Raw Normal View History

module Codewars.Kata.SplitStrings (solution) where
2022-04-19 23:06:08 +03:00
import qualified Data.Char as Char
solution :: String -> [String]
solution [] = []
solution [c1] = [c1 : "_"]
solution (c1:c2:rest) = (c1 : c2 : "") : solution rest