Skip to content

Add chunksOf #24

@chshersh

Description

@chshersh

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions