In mathematics and computer science, currying is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument.
In mathematics and computer science, currying is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument.
In the prototypical example, one begins with a function f:(X\times Y)\to Z that takes two arguments, one from X and one from Y, and produces objects in Z. The curried form of this function treats the first argument as a parameter, so as to create a family of functions f_x :Y\to Z. The family is arranged so that for each object x in X, there is exactly one function f_x, such that for any y in Y, f_x(y) = f(x,y).
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).