Article View: comp.lang.misc
Article #5394Multiple values
From: Cesar Quiroz
Date: Mon, 28 Mar 1988 18:18
Date: Mon, 28 Mar 1988 18:18
42 lines
1692 bytes
1692 bytes
Expires:
Sender:
Followup-To:
Gaynor@porthos asks
:How would Scheme's continuations fit into the area of multiple
:return values?
In a capsule:
1- Returning == Calling a continuation
so
2- Returning multiple values == Calling a continuation with multiple
arguments.
So, if `k' is the normal continuation of `f', and `f' tries to
return `v1', `v2', ..., you could model
(values v1 v2 ...)
as
(k v1 v2 ...)
I believe Scheme doesn't have this class of continuations
(Scheme's continuations take only one argument). However, that this
modification is possible has been known for a long time (at least
since Steele's work in RABBIT, which is as old as one can get
relative to Scheme), so I wouldn't be surprised if at least one
implementation has supported multiple values. Actually, this has
been known to denotational semantics people for even longer.
Cesar
--
Cesar Augusto Quiroz Gonzalez
Department of Computer Science ...allegra!rochester!quiroz
University of Rochester or
Rochester, NY 14627 quiroz@cs.rochester.edu
Technical Details
Message-ID:
<8121@sol.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bbn!rochester!quirozReferences:
<12176@brl-adm.ARPA> <1988Mar11.215238.976@utzoo.uucp> <719@l.cc.purdue.edu> <10763@mimsy.UUCP> <3177@haddock.ISC.COM> <18580@think.UUCP> <Mar.28.12.43.35.1988.1511@porthos.rutgers.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bbn!rochester!quiroz From: quiroz@cs.rochester.edu (Cesar Quiroz) Newsgroups: comp.lang.misc Subject: Multiple values Message-ID: <8121@sol.ARPA> Date: 28 Mar 88 18:18:22 GMT References: <12176@brl-adm.ARPA> <1988Mar11.215238.976@utzoo.uucp> <719@l.cc.purdue.edu> <10763@mimsy.UUCP> <3177@haddock.ISC.COM> <18580@think.UUCP> <Mar.28.12.43.35.1988.1511@porthos.rutgers.edu> Reply-To: quiroz@cs.rochester.edu (Cesar Quiroz) Organization: U of Rochester, CS Dept, Rochester, NY 14627 Lines: 35