[r6rs-discuss] "Unspecified"

From: Marcin 'Qrczak' Kowalczyk <qrczak>
Date: Mon Oct 2 12:19:08 2006

Sam Tobin-Hochstadt <samth_at_ccs.neu.edu> writes:

> (define (for-each/logging f l)
> (for-each (lambda (v) (let ([w (f v)]) (display w) (newline) w)) l))

The results of applications of the argument of for-each are ignored;
there is no reason to log them.

If you absolutely want to, you should check the number of results
instead of assuming that there is exactly one result. The argument
of for-each is allowed to return any number of results.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak_at_knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/
Received on Mon Oct 02 2006 - 12:18:54 UTC

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