From: Dave Thomas Date: 2008-05-27T01:41:55+09:00 Subject: Re: [PATCH] lambda with normal block syntax On May 26, 2008, at 11:31 AM, Yukihiro Matsumoto wrote: > |reads better to me, as does > | > | twotimes = fn x -> { 2 * x } > | > |as does > | > | twotimes = λ x -> { 2 * x } > > Interesting. What is the rationale for having both prefix > (fn or λ) > and -> symbol? Honoring functional languages tradition? I prefer > incomplete assignment model described in the prior post. Partly that, and partly because I wondered if the delimiter made parsing easier. If not, then I'd be very happy with losing the -> :) > > > |In fact, given a change that allows block arguments to be like method > |arguments, then maybe no other change is needed. We can always alias > |lambda to something shorter, and then everyone is happy > | > | n_times = λ { |n=2| λ {|val| n*val}} > > In that case, default values patch for block parameters are must. and block params? Dave