def any(iterable, pred=None): pred = Function(pred, arity=1) for x in compatible.ifilter(pred, iterable): return True return False
def where(iterable, pred): pred = Function(pred, arity=1) return compatible.ifilter(pred, iterable)