Beispiel #1
0
def any(xs):
    if not xs:
        return False
    else:
        x = head(xs)
        if x:
            return True
        return or_(x, any(tail(xs)))
Beispiel #2
0
def any(xs):
    return foldr(lambda x, ys: or_(x, ys), False, xs)
Beispiel #3
0
def any(xs):
    return foldr(lambda x, ys: or_(x, ys), False, xs)