Skip to content

Instantly share code, notes, and snippets.

@hyone
Created April 5, 2011 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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