Oh, the Y combinator The library Arnesi has this function. It comes from lambda calculus. It is more or less the formal demonstration that, in the lambda calculus theory, every function has a fixed point. And the fixed point of a function f is exactly the value returned by (Y f) (note that this is just in theory, it does not work exactly in practice because in practice not everything is a function)