Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-12-03 16:23:21 +05:30
parent 26374c815d
commit 9d6a8e6aaf
3 changed files with 337 additions and 1 deletions

7
Lib.hs
View File

@@ -1,4 +1,9 @@
module Lib (split) where
module Lib (chunks, split) where
chunks n xs
| null xs = []
| otherwise = head : chunks n tail
where (head, tail) = splitAt n xs
split :: Eq a => a -> [a] -> [[a]]
split del =