made with esnextbin
Last active
April 9, 2017 21:44
-
-
Save TylorS/30ad4149c3d59b7fbb7defd84a3eadd0 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
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) |
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": { | |
"167": "0.7.0", | |
"@most/core": "0.4.0", | |
"@most/scheduler": "0.4.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 _ = 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