Class: Proc

Inherits:
Object show all
Defined in:
lib/mug/apply.rb

Instance Method Summary collapse

Instance Method Details

#apply(*args) ⇒ Object

Curries this Proc and partially applies parameters. If a sufficient number of arguments are supplied, it passes the supplied arguments to the original proc and returns the result. Otherwise, returns another curried proc that takes the rest of arguments.



10
11
12
# File 'lib/mug/apply.rb', line 10

def apply(*args)
	curry.call(*args)
end