unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* call-with-values and primitives
@ 2013-01-11 14:23 bromley
  2013-01-11 15:43 ` Ian Price
  2013-01-11 16:56 ` Andy Wingo
  0 siblings, 2 replies; 3+ messages in thread
From: bromley @ 2013-01-11 14:23 UTC (permalink / raw)
  To: guile-user

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 - -)
ERROR: Wrong number of arguments to -
ABORT: (wrong-number-of-args)

https://gnu.org/software/guile/manual/guile.html#Multiple-Values






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-11 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 14:23 call-with-values and primitives bromley
2013-01-11 15:43 ` Ian Price
2013-01-11 16:56 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).