make-vector-with-proc

(make-vector-with-proc k func)


Description:

Make a vector of k elements where each element is the result of applying func


Arguments:

              k -- elements in vector

           func -- a function taking one index argument


Returns: vector


Related: make-vector make-list-with-proc 


Examples:

(make-vector-with-proc k (lambda (i) (* i 2))) => #(0 2 4 6 8)



Back to index