2022-04-20 03:27:08 +03:00
|
|
|
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
|