Skip to content

Add pagination combinators #7

@flupe

Description

@flupe

For static-site generation purposes, it's required to provide combinators such as the following:

chunks :: Task m Int -> Task m [a] -> Task m [[a]]

(We have the above already, although change info may be incorrect).

But something along those lines would be nice:

paginate :: Task m [a] -> Task m [(a, These a a)]

paginate
  :: Task m [a] 
  -> (Task m a -> Task m (i, b))
  -> (Task m b -> Task m (These i i) -> c)
  -> Task m [c]

Again, more thinking should go into this.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions