Created
August 5, 2018 15:56
-
-
Save anirudh-eka/42db1f9c5f87e2e0a52ef87e04f18fb4 to your computer and use it in GitHub Desktop.
Revisions
-
anirudh-eka created this gist
Aug 5, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ const filterGreaterThan2AndMapAdd1Reducer = (a, x) => { if(x > 2) { return mapAdd1Reducer(a, x) } else { return a; } } [1, 2, 3].reduce(filterGreaterThan2AndMapAdd1Reducer, []);