Repository navigation
v0.16.0
Changed
- BREAKING: Stream operators that accept a stream as their
primary input now use the unifiedover:label, replacing the
previous mix offrom:andin:. Affected functions:
stream.take,stream.drop,stream.take_checked,
stream.drop_checked,stream.take_while,stream.drop_while,
stream.interrupt_when,fold.find, andsink.find(which
re-exportsfold.find). The previous labels were inconsistent
across the API —take(from:, up_to:),take_while(in:, satisfying:),
filter(over:, keeping:),chunks_of(over:, into:), etc. — which
forced callers to remember 5 different conventions for the
"container" argument. Unifying onover:matches the majority of
combinators and the shape used byfold.fold,fold.all,
fold.any. Migration: renamefrom:andin:toover:at
every call site of the listed functions; positional / pipe-style
calls like|> stream.take(up_to: 5)are unchanged. The other
from:/in:labels in the package (source.range(from:, to:),
source.iterate(from:, with:),source.unfold(from:, with:),
scan(over:, from: initial, ...),fold(over:, from: initial, ...))
refer to initial values and directional bounds, not to the
container, and are intentionally left unchanged. (#218)
Install
gleam add datastreamSee HexDocs for the API
reference.