Posts tagged "fp"

Found 1 posts tagged fp

Functional JavaScript: Write your own negate/not function

Published on
#javascript #nodejs #javascript #programming #fp 

Let's say you want to filter odd numbers from a list of numbers, like [1,2,3,4,5,6] should become [1,3,5].

One way to solve this problem in a functional fashion is to provide an odd filter function, that is internally composed by a negation of an even filter on those numbers.

Read more