Effect CommunityEC
Effect Community•3y ago•
5 replies
Jules

Partitioning a Chunk into Chunks of B and C

Hi 🙂

I have a function const bOrC: (a: A) => B | C and a Chunk<A>, is there a partition function to get back a [Chunk<B>, Chunk<C>]?
Something like:
const bOrC: (a: A) => B | C = (a: A) => ...
const as: Chunk<A> = ...

const [bs, cs] = Chunk.partition(as, bOrC)
Was this page helpful?