Created
April 5, 2011 18:12
-
-
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?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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