Created
August 2, 2012 00:46
-
-
Save jasom/3232015 to your computer and use it in GitHub Desktop.
Jazzychad increment function
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
(defun increment (sequence val n) | |
(substitute (1+ val) val sequence | |
:from-end (< n 0) | |
:count (if (= n 0) nil (abs n)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment