• Collect when

    From B. Pym@21:1/5 to All on Fri Jun 20 21:58:52 2025
    (loop for x in y
    when (f x)
    collect (g x))

    Gauche Scheme:

    (define f positive?)
    (define (g x) (and (odd? x) (* x x)))
    (define y (iota 22 -8))

    (append-map
    (lambda(x) (if (f x) (list (g x)) '()))
    y)

    ===>
    (1 #f 9 #f 25 #f 49 #f 81 #f 121 #f 169)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)