summaryrefslogtreecommitdiffstats
path: root/src/utils.hs
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2022-01-30 14:34:53 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2022-01-30 14:34:53 +0200
commit3fbe17312a7b1474b290c129ebeca9ee7c773c6e (patch)
treeec80a2805fe2b4e64563219483e44fdc1b5697b9 /src/utils.hs
parent477579b5e8c7297efefc1ccabf8ead7c024ac4dc (diff)
Add string interpolation sugar
Diffstat (limited to 'src/utils.hs')
-rw-r--r--src/utils.hs5
1 files changed, 5 insertions, 0 deletions
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