take
accepts
1
input stream,
an amount
amount
, the value is emittedamount
, the value is emitted and the stream immediately completesreturns
a new stream of at most amount
values
filter
accepts
1
input stream,
a predicate
function
predicate
:
âś” true
, the value is emittedreturns a new stream of filtered values
âťš take
returns a new stream of at most amount values:
What does “the stream completes” mean? As a reminder, a stream is a sequence of events over time. And you can subscribe to a stream, using a listener. Let’s dive into the details now:
Ă— error: e
â—‰ complete
notificationĂ— error: e
or a â—‰ complete
notification, nothing else is emitted by the stream.Freelance Developer Advocate. Motion graphics with code. JavaScript and Elm. cedricsoulas.com
Receive my latest news, product updates and programming visualizations. You can unsubscribe at any time.