Closed chshersh closed 3 years ago
What do you think about adding the following function?
chunksOf :: Int -> Slist a -> Slist (Slist a)
For ordinary lists it would work like this:
ghci> chunksOf 3 [0..7] [[0,1,2], [3,4,5], [6,7]]
But since we have access to the list length, we can implement a more efficient version of chunksOf.
chunksOf
Nice! I like the idea :+1:
What do you think about adding the following function?
For ordinary lists it would work like this:
But since we have access to the list length, we can implement a more efficient version of
chunksOf
.