; 与えられた時間を分解し 00:00 からの経過分を計算する ; 起きた時間を +5 することで求めて hh:mm 形式に直して出力する (defun main (&rest argv) ; declare: dynamic-extent ftype ignorable ignore inline notinline optimize special type ; 特定の場所で使用され、宣言をするが評価はされない ; 以下の束縛の値は参照されないかもしれない (declare (ignorable argv)) (let* ((s (read-line)) ; read-from-string string &optional eof-error-p eof-value &key start end preserve-whitespace => object, position (h (read-from-string s t nil :end 2)) (m (read-from-string s t nil :start 3 :end 5)) (wake-up-time (+ (* h 60) m 5))) ; multiple-value-bind (var*) values-form declaration* form* => result* ; 新しい変数束縛を values-form によって作成し ; それを使って form を実行する (multiple-value-bind (wake-up-h wake-up-m) (floor wake-up-time 60) (format t "~2,'0d:~2,'0d~%" (mod wake-up-h 24) wake-up-m)))) (main)