10/01/17 01:00:17
>>297
;; Common Lisp ひさしぶりに挑戦
(dotimes (n 10)
(let (lst)
(dotimes (i (+ n 1)) (push (+ i 1) lst))
(setf lst (reverse lst))
(format t "~A = ~A~%"
(reduce #'(lambda (x y) (concatenate 'string x " + " y))
(map 'list #'(lambda (x) (concatenate 'string (princ-to-string x) "^2")) lst))
(reduce #'+ (map 'list #'(lambda (x) (* x x)) lst)))))