I think there’s a typo in the curry setup. You still need an & to call to_proc
on :+ and pass it as the block param, right?
def sum(*args)
args.reduce(&:+)
end
I think there’s a typo in the curry setup. You still need an & to call to_proc
on :+ and pass it as the block param, right?
def sum(*args)
args.reduce(&:+)
end