chickadee » list-utils » make-list/as

make-list/as OBJprocedure

Returns a procedure producing a list of the supplied object OBJ, of length equal to the integer or the (length list).

(define falses (make-list/as #f))
(falses '(1 2)) ;=> (#f #f)
(falses 1)      ;=> (#f)