DS
Size: a a a
yv
DS
🚀🚀
NS
persistent data structure is a data structure that always preserves the previous version of itself when it is modified
DP

🚀🚀
const node = createNode({
node: [
step.compute({
fn: x => x + 1
}),
step.filter({
fn: x => x % 2 === 0
}),
step.run({
fn(x) {
console.log(x)
}
})
]
})
launch(node, 1)
// => 2
launch(node, 2)
// no reaction
const event = createEvent()
// subscribe custom node to event
event.graphite.next.push(node)
event(1)
// => 2
event(2)
// => no reaction
// add transformation to event pipeline
event.graphite.seq.push(
step.compute({
fn: x => x - 1
})
)
event(2)
// => 2З
DP
🚀🚀
a». регистров есть три — a, b и value, они все доступны в третьем аргументе функций, передаваемых в fn методов compute, run и filterm
🚀🚀
a». регистров есть три — a, b и value, они все доступны в третьем аргументе функций, передаваемых в fn методов compute, run и filter🚀🚀
🚀🚀
🚀🚀
DP

🚀🚀
DP
🚀🚀
to