On 26/08/10 12:17, Eric J. Van der Velden wrote:
Hello,

I don't understand what the manual says about when there are more then two arguments to map or for-each.

With two arguments, the last one must be a list, so OK is

(for-each display '(1 3))

But the following are ERR,

(for-each display 1 3)

(for-each display '(1 3) '(1 3))

The function, in this case `display', needs to be able to take 2 args, for display it's the variable and the port:

(for-each display '(1 3) (list (current-output-port) (current-output-port)))

also consider

(map + '(1 3) '(1 3))

Paul.




Reply via email to