Skip to content
Create a gist now

Instantly share code, notes, and snippets.

@wagjo /gist:8786305
Last active

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
(defprotocol IMutable
(-cas! [o oldval newval]
"Sets the value to newval if and only if the current value
is identical to oldval. Returns true if set happened,
otherwse returns false. Mutates `o`.")
(-alter! [o f] [o f x] [o f x y] [o f x y z] [o f x y z args]
"Changes referenced value with (apply f val args).
Returns new value. Mutates `o`.")
(-reset! [o val]
"Resets the referenced value to `val`.
Returns new value. Mutates `o`."))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.