On Fri 11 Jan 2013 15:23, brom...@lavabit.com writes:
> (call-with-values * -)
> ⇒ -1
So it's like:
(call-with-values producer consumer)
The producer is called with no arguments, then the results of that call
are passed to the consumer.
So first `*' is called with no arguments, like this:
brom...@lavabit.com writes:
> Hello.
>
> Why does it return -1? Could anyone explain?
> (Comments are mine.)
The general principle is to try and give sensible results when +,*,etc
are called with a number of arguments other than 2. By thinking them
through at this level you can, in theory, write m
Hello.
Why does it return -1? Could anyone explain?
(Comments are mine.)
(call-with-values (lambda () (values 4 5))
(lambda (a b) b)) ; a is 4 and b is 5; return 5
⇒ 5
(call-with-values * -)
⇒ -1
More:
(call-with-values + +)
0
(call-with-values + -)
0
(call-with-values - -)