Return the first value if the condition is true, otherwise, return the
second.

@param bool $biased
@param mixed|Closure $one
@param mixed|Closure $other

@return mixed
498544
public static function firstBias($biased, $one, $other)
    {
        Arguments::define(Boa::boolean(), Boa::any(), Boa::any())
            ->check($biased, $one, $other);

        if ($biased) {
            return static::thunk($one);
        }

        return static::thunk($other);
    }
790046
public function shouldPrecede($first, $second) {
    $page = $this->getSession()->getPage()->getText();
    $pos1 = strpos($page, $first);
    if ($pos1 === FALSE) {
      throw new ExpectationException("Text not found: '$first'.", $this->getSession());
    }
    $pos2 = strpos($page, $second);
    if ($pos2 === FALSE) {
      throw new ExpectationException("Text not found: '$second'.", $this->getSession());
    }
    if ($pos2 < $pos1) {
      throw new \Exception("Text '$first' does not precede text '$second'.");
    }
  }
653020
public function levenshtein($first, $second)
    {
        $l = new \Atomescrochus\StringSimilarities\Levenshtein();

        return $l->compare($first, $second);
    }
903283
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if ($other instanceof RationalNode) {
            return $other->getDenominator() == 1 && $this->getValue() == $other->getNumerator();
        }
        if (!($other instanceof IntegerNode)) {
            return false;
        }

        return $this->getValue() == $other->getValue();
    }
677980
public function Compare($other)
	{
	    switch ( $other->GetValueCode() )
	    {
	        case SByteProxyFactory::Code:
	            return 0;

	        case ByteProxyFactory::Code:
	        case UShortProxyFactory::Code:
	        case UIntProxyFactory::Code:
	        case ULongProxyFactory::Code:
	        case ShortProxyFactory::Code:
	        case IntProxyFactory::Code:
	        case LongProxyFactory::Code:
	        case IntegerProxyFactory::Code:
	        case DecimalProxyFactory::Code:
	        case FloatProxyFactory::Code:
	        case DoubleProxyFactory::Code:
	            return -1;

	        default:
	            return -2;
	    }
	}
1259073
public static function one() : BigRational
    {
        static $one;

        if ($one === null) {
            $one = new BigRational(BigInteger::one(), BigInteger::one(), false);
        }

        return $one;
    }
542246
protected function valueEquals($other_value)
    {
        if (!is_float($other_value)) {
            return false;
        }

        return $this->almostEqual($this->getValue(), $other_value, $this->getEpsilon());
        //return (abs($this->getValue() - $other_value) < $this->getEpsilon());
    }
144829
public function equal($other, $delta = .0)
    {
        $this->isNumeric();

        if (0 === $delta) {
            return parent::equal($other);
        }

        return $this->doCheck(function ($value) use ($other, $delta) {
            $this->throwExceptionIfFalse(
                $this->isBetween($value - $other, -$delta, $delta),
                'Value %s is not equal to %s (±%s)', $value, $other, $delta
            );
        });
    }
126961
public function compare(\DateInterval $first, \DateInterval $second)
    {
        if ($this->safe) {
            $this->safecheck($first);
            $this->safecheck($second);
        }

        if ($first->y > $second->y) {
            return 1;
        }

        if ($first->y < $second->y) {
            return -1;
        }

        if ($first->m > $second->m) {
            return 1;
        }

        if ($first->m < $second->m) {
            return -1;
        }

        if ($first->d > $second->d) {
            return 1;
        }

        if ($first->d < $second->d) {
            return -1;
        }

        if ($first->h > $second->h) {
            return 1;
        }

        if ($first->h < $second->h) {
            return -1;
        }

        if ($first->i > $second->i) {
            return 1;
        }

        if ($first->i < $second->i) {
            return -1;
        }

        if ($first->s > $second->s) {
            return 1;
        }

        if ($first->s < $second->s) {
            return -1;
        }

        return 0;
    }
33510
public function logicalOr(self $other){
		
		$l = \max(array($this->count(), $other->count()));
		$new = new static();
		
		for($i = 0; $i < $l; ++$i){
			
			if(isset($this[$i]) && $other[$i]){
				$new[$i] = true;
			}
			else if(isset($other[$i]) && $other[$i]){
				$new[$i] = true;
			}
			else{
				$new[$i] = false;
			}
			
		}
		
		return $new;
		
	}
308928
public function evalEquals( core_kernel_classes_Literal $first,  core_kernel_classes_Literal $second)
    {
        $returnValue = (bool) false;

        
        if($first instanceof core_kernel_classes_Literal && $second instanceof core_kernel_classes_Literal)  {
    		$returnValue = $first->literal == $second->literal;
        }
        

        return (bool) $returnValue;
    }
42315
protected function type_compare($type1, $type2) {
        if ($type1->priority < $type2->priority) {
            return -1;
        }
        if ($type1->priority > $type2->priority) {
            return 1;
        }
        return 0;
    }
1264474
public function orWhere($first, $operator = null, $second = null)
	{
		return $this->on($first, $operator, $second, 'or', true);
	}
145314
function(first, second) {
			if (_equal(first, second)) {
				return true;
			}
			for (var i = 1; i <= first.length; i++) {
				if (_equal(first, _rotated(second, i))) {
					return true;
				}
			}
			return false;
		}
614509
public function orOn($first, $operator = null, $second = null)
    {
        return $this->on($first, $operator, $second, 'or');
    }
459760
function first(callable $closure = null) {
        if($closure === null) {
            if(empty($this->data)) {
                return null;
            }
            
            $keys = \array_keys($this->data);
            return ($this->data[$keys[0]] ?? null);
        }
        
        foreach($this->data as $key => $val) {
            $feed = (bool) $closure($val, $key);
            if($feed) {
                return $val;
            }
        }
        
        return null;
    }
990934
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if (!($other instanceof ConstantNode)) {
            return false;
        }

        return $this->getName() == $other->getName();
    }