Module | RParsec::FunctorMixin |
In: |
rparsec/functors.rb
|
Create a Proc, when called, the parameter is first passed into other, self is called in turn with the return value from other.
Create a Proc that‘s curriable. When curried, parameters are passed in from left to right. i.e. closure.curry.call(a).call(b) is quivalent to closure.call(a,b) . self is encapsulated under the hood to perform the actual job when currying is done. ary explicitly specifies the number of parameters to curry.
Create a Proc, when called, repeatedly call self for n times. At each iteration, return value from the previous iteration is used as parameter.
Create a Proc, when called, repeatedly call self for n times. The same arguments are passed to each invocation.
Create a Proc that‘s curriable. When curried, parameters are passed in from right to left. i.e. closure.reverse_curry.call(a).call(b) is quivalent to closure.call(b,a) . self is encapsulated under the hood to perform the actual job when currying is done. ary explicitly specifies the number of parameters to curry.