anchor.diff:  (test p36 (is (= 872187 (problem-36))))
   (test p37 (is (= 748317 (problem-37))))
   (test p38 (is (= 932718654 (problem-38))))
  +(test p39 (is (= 840 (problem-39))))
   
   
   ;; (run! :euler)
  
positive.code:                (when (pandigitalp result)
                   (in main (maximizing result)))))))
  
  
  ;;;; Tests --------------------------------------------------------------------
  (def-suite :euler)
  
negative.code:   (< (abs n) (expt 10 digits)))
  
  
  (defun adjoin% (list item &rest keyword-args)
    (apply #'adjoin item list keyword-args))
  
  (define-modify-macro adjoinf (item &rest keyword-args) adjoin%)
  
  
  (defun mv* (matrix vector)
    (iterate
      (with (rows cols) = (array-dimensions matrix))
      (initially (assert (= cols (length vector))))
      (with result = (make-array rows :initial-element 0))
      (for row :from 0 :below rows)
      (iterate (for col :from 0 :below cols)
               (for v = (aref vector col))
               (for a = (aref matrix row col))
               (incf (aref result row)
                     (* v a)))
      (finally (return result))))
  
  
  (defun pythagorean-triplet-p (a b c)
    (= (+ (square a) (square b))
       (square c)))
  
  (defun pythagorean-triplets-of-perimeter (p)
    (iterate
      (with result = '())
      (for c :from 1 :to (- p 2))
      (iterate
        (for a :from 1 :below (min c (- p c)))
        (for b = (- p c a))
        (when (pythagorean-triplet-p a b c)
          (adjoinf result (sort (list a b c) #'<)
                   :test #'equal)))
      (finally (return result))))
  
  
  (defun map-primitive-pythagorean-triplets (function stop-predicate)
    ;; http://mathworld.wolfram.com/PythagoreanTriple.html
    (let ((u #2A(( 1  2  2)
                 (-2 -1 -2)
                 ( 2  2  3)))
          (a #2A(( 1  2  2)
                 ( 2  1  2)
                 ( 2  2  3)))
          (d #2A((-1 -2 -2)
                 ( 2  1  2)
                 ( 2  2  3))))
      (recursively ((triple (vector 3 4 5)))
        (unless (apply stop-predicate (coerce triple 'list))
          (apply function (coerce triple 'list))
          (recur (mv* u triple))
          (recur (mv* a triple))
          (recur (mv* d triple))))))
  
  
  ;;;; Problems -----------------------------------------------------------------
  (defun problem-1 ()
    ;; If we list all the natural numbers below 10 that are multiples of 3 or 5,
  