From 3fbe17312a7b1474b290c129ebeca9ee7c773c6e Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sun, 30 Jan 2022 14:34:53 +0200 Subject: Add string interpolation sugar --- src/utils.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/utils.hs') diff --git a/src/utils.hs b/src/utils.hs index beff25e..5b78682 100644 --- a/src/utils.hs +++ b/src/utils.hs @@ -38,3 +38,8 @@ isCharStr str = breakOn :: (a -> Bool) -> [a] -> ([a], [a]) breakOn cond xs = break cond xs $> B.second (drop 1) + +mix :: [a] -> [a] -> [a] +mix (x : xs) (y : ys) = x : y : mix xs ys +mix x [] = x +mix [] y = y \ No newline at end of file -- cgit v1.3