vector-unfold-right should have example that uses index Per Bothner 25 Jan 2016 00:09 UTC
Re: vector-unfold-right should have example that uses index John Cowan 30 Jan 2016 19:30 UTC

vector-unfold-right should have example that uses index Per Bothner 25 Jan 2016 00:09 UTC

It would help to clarify that the first index to f is the index in vec,
so the values go from n-1 to 0.

For example one could replace the first example by:

(vector-unfold-right (λ (i) (values (cons i x) (+ x 1))) 5 0)
#=> ((0 . 4) (1 . 3) (2 . 2) (3 . 1) (4 . 0))

--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/