Skip to content

Instantly share code, notes, and snippets.

@Denommus
Last active December 17, 2015 17:29
Show Gist options
  • Select an option

  • Save Denommus/5646719 to your computer and use it in GitHub Desktop.

Select an option

Save Denommus/5646719 to your computer and use it in GitHub Desktop.
A small test gist for generating functions for time passing.
#!/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