1 2 3 4 5 6 7 8 9 10
(module (algebraic-structs functor vector base) (map) (import (rename scheme (map list-map)) (only (chicken base) add1)) (define (map f v) (let* ((len (vector-length v)) (new (make-vector len))) (do ((i 0 (add1 i))) ((= i len) new) (vector-set! new i (vector-ref v i))))))