Skip to content

Instantly share code, notes, and snippets.

@tusharmath
Last active July 23, 2016 17:21
Show Gist options
  • Save tusharmath/b1fa17eb7497d1fe4bebc2dfac4e5290 to your computer and use it in GitHub Desktop.
Save tusharmath/b1fa17eb7497d1fe4bebc2dfac4e5290 to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
</body>
</html>
// write ES2015 code and import modules from npm
// and then press "Execute" to run your program
console.clear()
const R = require('ramda')
const memoize = require('fast-memoize')
let i = 100000
const func = memoize(R.curry((a, b) => [a, b, i++]))
console.log(func(1, 2))
console.log(func(1, 2))
{
"name": "esnextbin-sketch",
"dependencies": {
"ramda": "0.7.2",
"fast-memoize": "2.0.2"
},
"version": "0.0.0"
}
'use strict';
// write ES2015 code and import modules from npm
// and then press "Execute" to run your program
console.clear();
var R = require('ramda');
var memoize = require('fast-memoize');
var i = 100000;
var func = memoize(R.curry(function (a, b) {
return [a, b, i++];
}));
console.log(func(1, 2));
console.log(func(1, 2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment