[r6rs-discuss] "Unspecified"

Per Bothner per at bothner.com
Mon Oct 2 09:38:26 EDT 2006


Sam Tobin-Hochstadt wrote:
> Then we would be unable to use `vector-set!' in many contexts that
> require a value, such as the following refactoring:
> 
> (for-each (lambda (x) (vector-set! v x)) indexes)
> 
> -->
> 
> (for-each/logging (lambda (x) (vector-set! v x)) indexes)
> 
> where:
> 
> (define (for-each/logging f l)
>    (for-each (lambda (v) (display v) (newline) (f v)) l))
> 
> Now we have an error if `vector-set!' returns no values.

I'm not seeing this.  It looks like the continuation and
return value behavior of for-each/logging is the same as for-each.

Is your concern tied to teh weird last-element specification of
for-each?
-- 
	--Per Bothner
per at bothner.com   http://per.bothner.com/



More information about the r6rs-discuss mailing list