>>> some(lambda x: x, [0, False, None])
    False
    >>> some(lambda x: x, [None, 0, 2, 3])
    2
    >>> some(operator.eq, [0,1,2], [2,1,0])
    True
    >>> some(operator.eq, [1,2], [2,1])
    False
432844
def some(predicate, *seqs):
    
    try:
        if len(seqs) == 1: return ifilter(bool,imap(predicate, seqs[0])).next()
        else:             return ifilter(bool,starmap(predicate, izip(*seqs))).next()
    except StopIteration: return False
188653
def _operatorOperands(tokenlist):
        ""
        it = iter(tokenlist)
        while 1:
            try:
                yield (it.next(), it.next())
            except StopIteration:
                break
1090896
def issorted(list_, op=operator.le):
    
    return all(op(list_[ix], list_[ix + 1]) for ix in range(len(list_) - 1))
784495
def p_expr_OR_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'OR', p[1], p[3], lambda x, y: x or y)
1971
private static Parser<Expression> compare(
      Parser<Expression> operand, String name, Op op) {
    return Parsers.sequence(
        operand, term(name).retn(op), operand,
        BinaryExpression::new);
  }
38439
def p_expr_LT_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'LT', p[1], p[3], lambda x, y: x < y)
1179028
def expression(self):
        
        return operatorPrecedence(self.relation, [
            (self.unary_op, 1, opAssoc.RIGHT),
            (self.binary_op_p1, 2, opAssoc.LEFT),
            (self.binary_op_p2, 2, opAssoc.LEFT)])
1026500
def _match_operator(self, p, value):
        
        if p[0] == '!':
            return self._OPERATOR_MAP[p[0]](self._match(p[1], value))
        elif p[0] == '^':
            return self._OPERATOR_MAP[p[0]](self._match(p[1][0], value), self._match(p[1][1], value))
        else:
            return self._OPERATOR_MAP[p[0]]([self._match(operator_or_filter, value) for operator_or_filter in p[1]])
380594
def difference(self, other):
        """"""
        return self.operation(other, lambda x, y: x - y)
523397
def some(arr):
    """"""
    return functools.reduce(lambda x, y: x or (y is not None), arr, False)
847176
def p_expr_NE_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'NE', p[1], p[3], lambda x, y: x != y)
770883
def is_entailed_by(self, other):
        
        other = BoolCell.coerce(other)
        if self.value == U or other.value == self.value:
            return True
        return False
582764
private static Operator substitute(Operator oper, List[] equatedIds) {
    Selector op1 = oper.getOperands()[0];
    Selector op2 = (oper.getOperands().length == 1) ? null : oper.getOperands()[1];
    if (op1 instanceof Identifier)
      op1 = substitute((Identifier) op1, equatedIds);
    else if (op1 instanceof Operator)
      op1 = substitute((Operator) op1, equatedIds);
    if (op1 == null)
      return null;
    if (op2 != null) {
      if (op2 instanceof Identifier)
        op2 = substitute((Identifier) op2, equatedIds);
      else if (op2 instanceof Operator)
        op2 = substitute((Operator) op2, equatedIds);
      if (op2 == null)
        return null;
    }
    if (op1 == oper.getOperands()[0] && (op2 == null || op2 == oper.getOperands()[1]))
      return oper;
    else if (oper instanceof LikeOperator) {
      LikeOperatorImpl loper = (LikeOperatorImpl) oper;
        return new LikeOperatorImpl(loper.getOp(), op1, loper.getInternalPattern(), loper.getPattern(), loper.isEscaped(), loper.getEscape());
    }
    else
      return (op2 == null) ? new OperatorImpl(oper.getOp(), op1) : new OperatorImpl(oper.getOp(), op1, op2);
  }
1275276
def p_expr_plus_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'PLUS', p[1], p[3], lambda x, y: x + y)
613430
def _tupleCompare(tuple1, ineq, tuple2,
                 eq=lambda a,b: (a==b),
                 ander=AND,
                 orer=OR):
    

    orholder = []
    for limit in range(len(tuple1)):
        eqconstraint = [
            eq(elem1, elem2) for elem1, elem2 in zip(tuple1, tuple2)[:limit]]
        ineqconstraint = ineq(tuple1[limit], tuple2[limit])
        orholder.append(ander(*(eqconstraint + [ineqconstraint])))
    return orer(*orholder)
696139
def _eq(self, other):
        """"""
        return (self.type, self.value) == (other.type, other.value)
816815
def _build_func(eq, **args):
    
    '''
    eq_prime = eq.diff(args['x'])
    s1 = eq_prime
    s2 = eq - eq_prime*args['x']
    EQ = _syp.lambdify(args.values(), expr=eq, modules='numpy')
    S1 = _syp.lambdify(args.values(), expr=s1, modules='numpy')
    S2 = _syp.lambdify(args.values(), expr=s2, modules='numpy')
    return EQ, S1, S2