chickadee » srfi-1 » filter-map

filter-map f clist_1 clist_2 ...procedure

Like map, but only true values are saved.

(filter-map (lambda (x) (and (number? x) (* x x))) '(a 1 b 3 c 7))
    => (1 9 49)

The dynamic order in which the various applications of F are made is not specified.

At least one of the list arguments must be finite.