(collect (subseries (map-fn t (lambda (triplet) (destructuring-bind (c b a) triplet (list a b c))) (choose-if (lambda (triplet) (destructuring-bind (c b a) triplet (= (expt c 2) (+ (expt b 2) (expt a 2))))) (scan-fn t (lambda () (list 1 1 1)) (lambda (triplet) (destructuring-bind (c b a) triplet (cond ((< a b) (list c b (1+ a))) ((< b c) (list c (1+ b) 1)) (t (list (1+ c) 1 1)))))))) 0 10))