RosettaCodeData/Task/Amb/Common-Lisp/amb-5.lisp

11 lines
233 B
Common Lisp

(defun magic-square (a b c d e f g h i)
(and (/= a b c d e f g h i)
(= (+ a b c)
(+ d e f)
(+ g h i)
(+ a d g)
(+ b e h)
(+ c f i)
(+ a e i)
(+ c e g))))