filter
accepts
1 input stream,
a predicate function
predicate:
✔ true, the value is emittedreturns a new stream of filtered values
map
accepts
1 input stream,
a project function
project function and the resulting value is emittedreturns a new stream of projected values
In the video example, ▬ isEven accepts a number as an argument:
✔ true✘ falseIt is used as:
❚ map❚ filterA predicate returns ✔ true or ✘ false.
Learn more about project and predicate.
See also
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.