[r6rs-discuss] "Unspecified"

From: Per Bothner <per>
Date: Mon Oct 2 09:38:48 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/
Received on Mon Oct 02 2006 - 09:38:26 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC