def METHOD_NAME(self, n=1, left=True) -> Function:
    """
    Currying, i.e. turn a binary function into a function-valued function.
    Parameters:
        n : The number of types to curry.
        left : Whether to curry on the left or right.
    """
    if left:
        dom = self.dom[:len(self.dom) - n]
        cod = Function.exp(self.cod, self.dom[len(self.dom) - n:])
    else:
        dom, cod = self.dom[n:], Function.exp(self.cod, self.dom[:n])
    return Function(dom=dom, cod=cod, inside=lambda *xs: lambda *ys:
                    self(*(xs + ys) if left else (ys + xs)))