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.
szgyg
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user