Created
March 21, 2015 06:17
-
-
Save samarpanda/c45f4e294156db16d045 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/kakujo
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.8.0/ramda.min.js"></script> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var _ = R; | |
var newmap = _.curry(function(f, list){ | |
var concatList = function(acc, elt){ | |
return acc.concat(f(elt)); | |
} | |
return _.reduce(concatList, [], list); | |
}); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var _ = R; | |
var newmap = _.curry(function(f, list){ | |
var concatList = function(acc, elt){ | |
return acc.concat(f(elt)); | |
} | |
return _.reduce(concatList, [], list); | |
});</script></body> | |
</html> |
This file contains 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
var _ = R; | |
var newmap = _.curry(function(f, list){ | |
var concatList = function(acc, elt){ | |
return acc.concat(f(elt)); | |
} | |
return _.reduce(concatList, [], list); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment