made with esnextbin
Last active
May 16, 2017 15:51
-
-
Save TylorS/efc15da333f4bc5e9f449efff62c7202 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> | |
<!-- put markup and other contents here --> | |
</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 { mergeConcurrently, from, multicast, take } from 'most' | |
import { hold } from 'most-subject' | |
import { range, map } from '167' | |
console.clear() | |
const concatAll = (...streams) => mergeConcurrently(1, from(map(hold(1), streams))) | |
const a = from(range(1, 10)) | |
concatAll(take(3, a), a).observe(console.log) |
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": { | |
"167": "0.7.0", | |
"most": "1.2.2", | |
"most-subject": "5.3.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 _ = require('167'); | |
var _most = require('most'); | |
var _mostSubject = require('most-subject'); | |
console.clear(); | |
var concatAll = function concatAll() { | |
for (var _len = arguments.length, streams = Array(_len), _key = 0; _key < _len; _key++) { | |
streams[_key] = arguments[_key]; | |
} | |
return (0, _most.mergeConcurrently)(1, (0, _most.from)((0, _.map)((0, _mostSubject.hold)(1), streams))); | |
}; | |
var a = (0, _most.from)((0, _.range)(1, 10)); | |
concatAll((0, _most.take)(3, a), a).observe(console.log); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment