Audvik Labs

currying-in-ruby

What is Currying in Ruby?

Currying is a technique in which a function accepts N parameters and turns it into a sequence of functions, each of them take 1 parameter. In mathematics and computer science, currying is the technique of translating the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single argument. For example, a function that takes two arguments, one from X and one