(no title)
dmitry-vsl | 2 years ago
const point = {x: 1, y: 2}
point.x = 2
And instead you should use this: const point = {x: 1, y: 2}
const another_point = {...point, x : 2}
In Leporello.js, it's vital to avoid mutating data structures; instead, you create new ones. You can watch Rich Hickey's insightful talk [0], where he discusses the advantages of immutability in functional programming.In many ways, Leporello.js bears a resemblance to Clojure. Clojure served as a source of inspiration for Leporello.js, to the extent that I even contemplated building Leporello.js for Clojure first.
aragonite|2 years ago
fib(6), fib(7) // scratch:9:6 - unexpected token
dmitry-vsl|2 years ago