def modulo(y):
    """modulo(y)(x) = x % y

    Be careful with this because the % operator is not commutative.

    You may be interested in func.flip(modulo) to reverse the arguments.

    >>> modulo(2)(4)
    0
    >>> modulo(2)(5)
    1
    >>> from .func import flip
    >>> flip(modulo)(5)(2)
    1
    """
    return lambda x: x % y
