Last active
August 29, 2015 14:15
-
-
Save JemiloII/6ca4c5bb71aabb6e5a2e 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
// include https://cdn.rawgit.com/ramda/ramda/master/dist/ramda.min.js | |
// var _ = require('ramda'); | |
var foo = _.curry(function (a, b){ | |
return a + b; | |
}); | |
var bar = foo(2); //=> function(b){ return 2 + b; } | |
bar(3); //=> 5 |
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 pure (a, b){ | |
return a + b; | |
} | |
var d = new Date(); | |
var n = d.getSeconds(); | |
function impure (a) { | |
return a + n; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment