Skip to content

Instantly share code, notes, and snippets.

@hyone
Created April 5, 2011 18:12
Show Gist options
  • Save hyone/904156 to your computer and use it in GitHub Desktop.
Save hyone/904156 to your computer and use it in GitHub Desktop.
Is there any better way to validate new value is bigger than current value?
(def counter (agent 0))
(set-validator! counter (fn [n] (>= n @counter)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment