Skip to content

Instantly share code, notes, and snippets.

@TylorS
Last active April 9, 2017 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TylorS/30ad4149c3d59b7fbb7defd84a3eadd0 to your computer and use it in GitHub Desktop.
Save TylorS/30ad4149c3d59b7fbb7defd84a3eadd0 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>
import { fromArray, tap, runEffects } from '@most/core'
import { newDefaultScheduler } from '@most/scheduler'
import { curry } from '167'
const scheduler = newDefaultScheduler()
const observe = curry((f, stream) => runEffects(tap(f, stream), scheduler))
const a = fromArray([ 1, 2, 3 ])
const log = observe(console.log)
log(a)
{
"name": "esnextbin-sketch",
"version": "0.0.0",
"dependencies": {
"167": "0.7.0",
"@most/core": "0.4.0",
"@most/scheduler": "0.4.0"
}
}
'use strict';
var _ = require('167');
var _core = require('@most/core');
var _scheduler = require('@most/scheduler');
var scheduler = (0, _scheduler.newDefaultScheduler)();
var observe = (0, _.curry)(function (f, stream) {
return (0, _core.runEffects)((0, _core.tap)(f, stream), scheduler);
});
var a = (0, _core.fromArray)([1, 2, 3]);
var log = observe(console.log);
log(a);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment