def callable_to_array(method):
    """If the first argument of the method is callable, replaces it with the callable evaluated on self."""
    def wrapper(self, fnc, **kwargs):
        if callable(fnc):
            return method(self, fnc(self), **kwargs)
        else:
            return method(self, fnc, **kwargs)
    return wrapper