Skip to content
TurtleKitty edited this page May 18, 2019 · 2 revisions

cell

A cell is a single mutable cell used for imperative programming.

messages

(def box (cell 3)) ; #(cell 3)

box.type       ; (cell)
box.get        ; 3
(box.set! 5)   ; 5
box            ; #(cell 5)

box.inc!       ; 6
box.inc!       ; 7
box            ; #(cell 7)
box.dec!       ; 6
box            ; #(cell 6)
Clone this wiki locally