Skip to content

linear types style mutation #759

Discussion options

You must be logged in to vote

Variable bindings themselves are not
mutable (there is no (setf x y)), but Coalton supports mutable cells. So you can use new to make a new cell, read to get its value, and write! to mutate it.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@confusedcharlotte
Comment options

Answer selected by confusedcharlotte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help!
Labels
None yet
2 participants