Lisp Calendar Function by Shane Zentz
; Shane Zentz
; Homework 6
(defun next-day (day)
"This function returns the next symbol in a list"
(cond ((equal day 'monday) 'tuesday)
((equal day 'tuesday) 'wednsday)
((equal day 'wednsday) 'thursday)
((equal day 'thursday) 'friday)
((equal day 'friday) 'saturday)
((equal day 'saturday) 'sunday)
((equal day 'sunday) 'monday)))
(setq days "monday")
(setq ddd "tuesday")
(setq eee "sunday")
(defvar DAYS '(sunday monday tuesday wednesday thursday friday saturday))
(defun random-day (L)
(setq x (abs (mod 7 (random))))
(print "Topdy is " (capitalize (symbol-name (elt L) x))
(print "and tomorrow will be "
(capitalize (symbol-name (cdr(L)))))))
(defun calander (i days)
"calander that starts at index i (day of the week) and prints cal for days"