Flow Operators

KOTLIN › Flow

Shaping a stream: transform, the Latest family, combine and zip, timing operators, and the ends of a flow.

Flow operators are examined by problem rather than by name: an interviewer describes a search box, or two inputs that must be recombined, and expects the right operator back. Expect to distinguish the pairs candidates swap, combine against zip and debounce against sample, and to know that transform is the general case map and filter are built from. Strong answers also know that take cancels the upstream, that the Latest family only helps when the work it interrupts actually suspends, and that onCompletion observes while catch handles.

What this covers

Study this topic

Further reading