Just wanted to share this link with you. Basically, this is how you can curry a method in Ruby:
class Object
def curry(method,*params)
lambda { send method,*params }
end
end
Thanks Marcos Toledo!
Just wanted to share this link with you. Basically, this is how you can curry a method in Ruby:
class Object
def curry(method,*params)
lambda { send method,*params }
end
end
Thanks Marcos Toledo!
0 Responses to “ruby method currying”