Skip to content

Instantly share code, notes, and snippets.

@noprompt
Created July 9, 2014 17:32
Show Gist options
  • Save noprompt/b477589baa5c83c1e307 to your computer and use it in GitHub Desktop.
Save noprompt/b477589baa5c83c1e307 to your computer and use it in GitHub Desktop.
(extend-protocol ISwap
om/MapCursor
(-swap! [this f]
(om/transact! this f))
(-swap! [this f a]
(om/transact! this #(f a)))
(-swap! [this f a b]
(om/transact! this #(f a b)))
(-swap! [this f a b xs]
(om/transact! this #(apply f a b xs))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment