On Tue, May 17, 2011 at 3:21 PM, Robby Findler
<ro...@eecs.northwestern.edu> wrote:
> What is the rule for where the lambda goes?

If you have an application with one (or more) occurences of `_' as
immediate subforms, then that application is rewritten into (lambda
args the-original-application).

It doesn't attempt to do a deep inspection of the term, or to expand
the arguments to `#%app'.

Thus:

(+ _ 1) = (lambda (x) (+ x 1))

(+ (+ _ 1) 2) = (+ (lambda (x) (+ x 1)) 2) ;; which is a runtime error

This rule is (a) simple and (b) the same as what Scala does.
-- 
sam th
sa...@ccs.neu.edu
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Reply via email to