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

*To*: srfi-26@xxxxxxxxxxxxxxxxx*Subject*: Problems with "curry"'s formal specification*From*: Al Petrofsky <al@xxxxxxxxxxxxx>*Date*: Mon, 25 Feb 2002 14:44:58 -0800*Delivered-to*: srfi-26@xxxxxxxxxxxxxxxxx

The formal spec of curry is vague in a few respects: Specification The formal syntax of a curried expression, in the style of the [5]Revised^5 Report on the Algorithmic Language Scheme: <curried-expression> --> (curry <proc> <const-or-slot>*) | (curry <proc> <const-or-slot>* <...>) <proc> --> <expression> ; a procedure <const-or-slot> --> <> ; a "slot" | <expression> ; a constant The macro curry transforms a <curried-expression> into a <lambda expression> with as many formal variables as there are slots in the list <const-or-slot>*. The body of the resulting <lambda expression> calls <proc> with the arguments from <const-or-slot>* in the order they appear. In case there is a rest-slot symbol for the residual arguments of a variable arity procedure, the resulting procedure is also of variable arity and the body calls <proc> with all arguments provided to the actual call of the specialized procedure. Why are "const"s called "constant"? May they be any expressions? When is the procedure expression evaluated? When are the "constants" evaluated? In other words, which of the following expressions are legal, and what do they return? (let* ((x +) (y (curry x <> 1))) (set! x -) (y 0)) (let* ((x 1) (y (curry + <> x))) (set! x -1) (y 0)) The reference implementations give different results. -al

- Prev by Date:
**Re: l, the ultimate curry that is not curry** - Next by Date:
**Re: is that useful?** - Previous by thread:
**Re: l, the ultimate curry that is not curry** - Next by thread:
**Re: Problems with "curry"'s formal specification** - Index(es):