Hi All,

The following Scheme code, loop-through-vector iterates through the u16vector  v and increments the elements of v.
 
(define v (make-u16vector 10 0))

(define (loop-through-vector length)
   (let loop ([j 0])
       (if(< j length)
          (begin 
              (u16-vectorset! v j (+  j 1))
              (loop (+ j1))))))


(define (main)
   (loop-through-vector (u16vector-length v))

(main)

My question is how can I implement loop-through-vector using c-lambda. Most important thing is how can i access u16vector from c-code. If anyone can give me the code for loop-through-vector using c-lambda, that would be so helpful. Or ,is there alternate solutions other than c-lambda.

Regards,
Rashed