prc.curry â a_procprc.curry(arity) â a_proc
Instance Public methods
Returns a curried proc. If the optional arity argument is given,
it determines the number of arguments. A curried proc receives some
arguments. 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.
b = proc {|x, y, z| (x||0) + (y||0) + (z||0) }
p b.curry[1][2]