예제 #1
0
파일: operations.py 프로젝트: mashiro/linqy
def any(iterable, pred=None):
    pred = Function(pred, arity=1)
    for x in compatible.ifilter(pred, iterable):
        return True
    return False
예제 #2
0
파일: operations.py 프로젝트: mashiro/linqy
def where(iterable, pred):
    pred = Function(pred, arity=1)
    return compatible.ifilter(pred, iterable)