made with esnextbin
Created
August 14, 2016 00:16
-
-
Save theadam/7d4fb62dea6bcd6a72d1f0bf41d2ba2e to your computer and use it in GitHub Desktop.
esnextbin sketch
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>ESNextbin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<div id="app"></div> | |
</body> | |
</html> |
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
import { curryN } from 'ramda'; | |
function test(a, b) { | |
return (c = null) => { | |
console.log(a, b, c) | |
} | |
} | |
const t = curryN(2, test); | |
console.log(t(1)(2)(3)) |
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
{ | |
"name": "esnextbin-sketch", | |
"version": "0.0.0", | |
"dependencies": { | |
"ramda": "0.21.0" | |
} | |
} |
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
'use strict'; | |
var _ramda = require('ramda'); | |
function test(a, b) { | |
return function () { | |
var c = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0]; | |
console.log(a, b, c); | |
}; | |
} | |
var t = (0, _ramda.curryN)(2, test); | |
console.log(t(1)(2)(3)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment