diff options
Diffstat (limited to 'utils.hs')
| -rw-r--r-- | utils.hs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -25,4 +25,9 @@ removeAt :: [Int] -> [b] -> [b] removeAt is xs = mapWithIndex id xs $> filter (\(i', _) -> i' `notElem` is) .> map snd slice :: Int -> Int -> [a] -> [a] -slice from to xs = take (to - from + 1) (drop from xs)
\ No newline at end of file +slice from to xs = take (to - from + 1) (drop from xs) + +splitEvery _ [] = [] +splitEvery n list = first : splitEvery n rest + where + (first, rest) = splitAt n list
\ No newline at end of file |
