Created
April 7, 2016 00:44
-
-
Save evilsoft/c7890eb259d7828c578916d08b86ddc3 to your computer and use it in GitHub Desktop.
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 characters
function filter(func, arr) { | |
return arr.reduce(function(memo, item) { | |
return func(item) ? memo.concat(item) : memo.slice() | |
}, []) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment