split

open fun split(f: (T) -> Int): THIS

(DOC) Splits payload objects into a variable number of equally sized pieces.

The caller provides a function which, for each object, decides how many pieces it should be split into. If it returns 1, the object will be unchanged.

Parameters

f

a function that decides how many pieces each object should be split into

Throws

if f returns a number less than 1, or a number greater than the number of microseconds contained in the object's interval