def constantly(value):
    """
    Creates a function that returns the same value that is used
    as the argument of

    >>> import function as f
    >>> std_gravity = f.constantly(9.81) # m/s2
    >>> std_gravity(2)
    9.81
    """

    def f(x):
        return value

    return f