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
var state = require('./state'); | |
var f1 = require('./f1'); | |
var f2 = require('./f2'); | |
try{ | |
f1();//Change state, really bad | |
var newState = f2();// pure function | |
//await f3 | |
//yield* f4 | |
}catch(e){ | |
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
var cellx = require('cellx'); | |
var x = new cellx.Cell | |
cellx.Cell.prototype.if = function (trueCondition) { | |
this.subscribe(function () { | |
this.get() && trueCondition() | |
}); | |
this.get() && trueCondition() | |
} |
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
var cellx = require('cellx'); | |
var a = cellx(55); | |
var x = cellx((push) => { | |
//a() //Если раскомментировать эту строку, то x начинает пересчитываться! | |
setTimeout(() => { | |
push("test" + a()); | |
}, 100) | |
}) | |
x('addChangeListener', () => { | |
console.log("addChangeListener, x:: ", x()); |
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
var cellx = require('cellx'); | |
var a = cellx(55); | |
var x = cellx((push) => { | |
//a() //Если раскомментировать эту строку, то x начинает пересчитываться! | |
setTimeout(() => { | |
push("test" + a()); | |
}, 100) | |
}) | |
x('addChangeListener', () => { | |
console.log("addChangeListener, x:: ", x()); |
NewerOlder