Last active
December 17, 2015 17:29
-
-
Save Denommus/5646719 to your computer and use it in GitHub Desktop.
A small test gist for generating functions for time passing.
This file contains hidden or 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
| #!/usr/bin/sbcl --script | |
| (defmacro time-methods (&body list) | |
| (let ((number (gensym))) | |
| `(progn | |
| ,@(loop for (key value) on list by #'cddr | |
| collect `(defun ,key (,number) | |
| (* ,number ,value)))))) | |
| (time-methods seconds 1 minutes 60 hours 3600 days 86400) | |
| (print (days 7)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment