RosettaCodeData/Task/List-comprehensions/Scheme/list-comprehensions-2.scm
2024-10-16 18:07:41 -07:00

9 lines
210 B
Scheme

(use srfi-42) ;; for Gauche or Chicken
or
(require srfi/42) ;; for Racket
(list-ec (: x 1 21)
(: y x 21)
(: z y 21)
(if (= (* z z) (+ (* x x) (* y y))))
(list x y z))