Hi Bram and Ken Takata.

I think there is some problem in variable substitution of lambda function.

echo ({y -> ({x -> x(y)(10)})({y -> y})})({z -> z})

yields an error `E121: Undefined variable: y`. I expect this expression yields 
10. I tested on Vim 7.4.2048.

JavaScript:
(function(y){ return (function(x){ return x(y)(10); })(function(y){ return y; 
}); })(function(z){ return z; })

Python:
(lambda y: (lambda x: x(y)(10))(lambda y: y))(lambda z: z)

Ruby:
(lambda {|y| (lambda {|x| (x.call(y)).call(10)}).call(lambda {|y| 
y})}).call(lambda {|z| z})

All these expressions prints 10 as expected.

Anyway, 7.4.2044 is surely a great advance in the history of Vim script. Thanks.

Sincerely,
Ken Hamada

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui