Home > polyethylene > ChunkingPredicate
A function that receives an element (elem
) of the iteration and the first and last element of a chunk, and returns a boolean value representing whether elem
should be added to the current chunk (if true
) or be the start of a new chunk (if false
)
Signature:
export declare type ChunkingPredicate<T> = (elem: T, lastElem: T, firstElem: T) => boolean;