made with esnextbin
Last active
April 23, 2017 08:42
-
-
Save tusharmath/0a7c3ce7e42090dfca0b917a108f2561 to your computer and use it in GitHub Desktop.
esnextbin sketch
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> | |
<meta charset="utf-8"> | |
<title>ESNextbin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<!-- put markup and other contents here --> | |
</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
// write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
import * as O from 'observable-air' | |
import * as R from 'ramda' | |
const even = R.compose( | |
O.slice(0, 5), | |
O.scan(R.add(2), -2), | |
O.interval | |
) | |
O.forEach(i => console.log(Date.now(), i), even(100)) |
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
{ | |
"name": "esnextbin-sketch", | |
"version": "0.0.0", | |
"dependencies": { | |
"observable-air": "4.2.0", | |
"ramda": "0.23.0" | |
} | |
} |
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
'use strict'; | |
var _observableAir = require('observable-air'); | |
var O = _interopRequireWildcard(_observableAir); | |
var _ramda = require('ramda'); | |
var R = _interopRequireWildcard(_ramda); | |
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | |
// write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
var even = R.compose(O.slice(0, 5), O.scan(R.add(2), -2), O.interval); | |
O.forEach(function (i) { | |
return console.log(Date.now(), i); | |
}, even(100)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment