Ruby parens-free function calls [was Re: Accessing parent objects]

Gregory Ewing greg.ewing at canterbury.ac.nz
Tue Mar 27 17:42:11 EDT 2018


Chris Angelico wrote:
> Ahh, that explains it. Great. So how do you build higher-order
> functions? Or don't you?

You don't, exactly. You have to pass around objects
with a method to invoke when you want to "call" them.

Ruby has a code-block syntax that helps with this
somewhat, but I don't think you can invoke one with
the same syntax that you use for calling a method.

-- 
Greg



More information about the Python-list mailing list