On Thu, 05 Jan 2017 07:59:29 -0800, alex.jakime...@gmail.com wrote:
> Code:
> say { 0 => 1, 1 => 0 }.max(:by(*.value))
> 
> Result:
> 1 => 0
> 
> 
> Code:
> say { 0 => 1, 1 => 0 }.max(*.value)
> 
> Result:
> 0 => 1
> 
> 
> I think :by(…) is something people commonly try (somebody did this on
> camelia, and I remember doing this myself), so it would be great if it
> could warn the user.


So why do people try it, anyway? Why that specific named param?

I rather not litter the code with heuristics to catch arbitrary named params.

Reply via email to