[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: values->list elements

From: szgyg
Subject: Re: values->list elements
Date: Fri, 16 Jun 2006 07:51:13 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; hu-HU; rv:1.8) Gecko/20051201 Thunderbird/1.5 Mnenhy/

Jonathan Wilson wrote:
szgyg wrote:
No, this is impossible without redefining +. A macro produces 1 sexp, not more.

This is exactly what I am getting at.

Oh, yes, I see.

This isn't a new idea, but the original semantic.

| (this is not a serious proposal for a language extension,
| but only an example):
| (1) Wherever n consecutive arguments might be written in
|     a function call, one may instead write {f x1 ... xm}n,
|     where n is a positive integer. The "function" f must
|     return n values, which are used as n arguments
|     in the function call.
| (2) The primitive (values x1 ... xn) returns its n arguments
|     as its n values. Thus writing "{values x1 ... xn}n" is
|     the same as writing "x1 ... xn" as arguments in a
|     function call.

[Guy L. Steele: LAMBDA: The Ultimate Declarative, 1976, p 18-19]

I think however, that explicit function transformer is a reasonable alternative.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]