I was expecting the following to return a Proc:
:+.to_proc.curry.(10)
But it raises an error:
ArgumentError (wrong number of arguments (given 0, expected 1))
If we have a proc similar to :+
:
add = ->(x,y){x + y}
add.curry.(10)
I get the expected Proc.
Why curry doesn’t work as I’m expecting with :+
?