def ends_with(suffix):
    """
    Returns a function calling endswith using the given prefix on a given value.

    >>> ends_with('123')('abc123')
    True
    >>> ends_with('abc')('abc123')
    False

    :param suffix: Suffix to check
    :return: Function
    """

    def _ends_with(s):
        return s.endswith(suffix)

    return _ends_with