the method example
o.my_method(5) == 15 # true
method_as_fun = o.my_method
# Wrong number of arguments, 0 for 1
misrepresents ruby, since you can get at the equivalent method object via
method_as_fun = o.method(:my_method)
method_as_fun(15) # error
method_as_fun[15] # works
still doesn't have pyret's substitutability, but the bound method is available and does the right thing when you call it, albeit with clunky syntactic support.
the method example
misrepresents ruby, since you can get at the equivalent method object via
still doesn't have pyret's substitutability, but the bound method is available and does the right thing when you call it, albeit with clunky syntactic support.