-
Notifications
You must be signed in to change notification settings - Fork 0
Functions
Sasa Bogicevic edited this page May 14, 2017
·
6 revisions
You can compose two or more functions together. They will be evaluated from right to left.
function mult2(x){return x * 2;}
function add1(x){return x + 1;}
var composition = F.compose(add1, mult2);
composition(2) -> 5
Read more about currying here
function mult2(x,y){return x * y;}
var multiplicator = F.curry(mult2);
multiplicator(2); -> Function
multiplicator(3); -> 6
