🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5235

Re: Returning multiple values

#5235
From: Christopher Dollin
Date: Tue, 08 Mar 1988 08:08
21 lines
1088 bytes
And of course Pop11 (and it's predecessors Pop-2, Pop-10) have always had 
multiple return values, by virtue of the open stack (like Forth, although that
gives almost, but not quite, entirely the wrong impression ....)

To swop x and y:

    x, y -> x -> y          (not as transparent as x, y -> y, x, alas)

You can also play nice games; for example if _f_ takes 1 arg and delivers 2
results, _g_ takes 2 args and delivers 1 result, then

    g(f(x))                 does the "right" thing

(ie _g_ is applied to the two results coming back from _f_). Makes functional
composition dead easy to define!




Regards,
Kers                                    | "Why Lisp if you can talk Poperly?"
Technical Details
Message-ID: <2400007@otter.hple.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-lcc!pyramid!hplabs!otter!kers
References: <509@left.soe.clarkson.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-lcc!pyramid!hplabs!otter!kers
From: kers@otter.hple.hp.com (Christopher Dollin)
Newsgroups: comp.lang.misc
Subject: Re: Returning multiple values
Message-ID: <2400007@otter.hple.hp.com>
Date: 8 Mar 88 08:08:13 GMT
References: <509@left.soe.clarkson.edu>
Organization: Hewlett-Packard Laboratories, Bristol, UK.
Lines: 20