@sig(H[(RealFrac, "a"), (Integral, "b")]/ "a" >> ("b", "a"))
def properFraction(x):
    """
    properFraction :: RealFrac a, Integral b => a -> (b, a)

    The function properFraction takes a real fractional number x and returns a
    pair (n,f) such that x = n+f, and:

        n is an integral number with the same sign as x; and
        f is a fraction with the same type and sign as x, and with absolute
        value less than 1.
    """
    return RealFrac[x].properFraction(x)
dataset/ETHPy150Open billpmurphy/hask/hask/Data/Num.py/properFraction/original