fork download
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2.  
  3. (defstruct (date
  4. (:constructor make-date (day month year)))
  5. (day 1 :type (integer 1 31))
  6. (month 1 :type (integer 1 12))
  7. (year 0 :type (integer 0)))
  8.  
  9. (defmethod print-object ((date date) stream)
  10. (format stream "~d-~d-~d"
  11. (date-year date)
  12. (date-month date)
  13. (date-day date)))
  14.  
  15. (print (list (make-date 12 11 2015)
  16. (make-date 13 01 2044)))
  17.  
  18.  
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20.  
  21. (defun foo (&rest args &key m x)
  22. (print args)
  23. (print m)
  24. (print x))
  25.  
  26. (defun bar (m n)
  27. (foo 'keyword:m :m m n))
  28.  
  29. (bar :x 42)
Success #stdin #stdout 0.01s 10784KB
stdin
Standard input is empty
stdout
(2015-11-12 2044-1-13) 
(:M :M :X 42) 
:M 
42