/** * This method tests the "any" method. * * @dataProvider data_any */ public function test_any(array $provided, array $expected) { $p0 = IArrayList\Type::make($provided[0], '\\Saber\\Data\\IInt32\\Type'); $p1 = $provided[1]; $r0 = IArrayList\Module::any($p0, $p1); $e0 = $expected[0]; $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $r0); $this->assertSame($e0, $r0->unbox()); }
/** * This method returns whether any of the items of the list evaluate to true. * * @access public * @static * @param IArrayList\Type $xs the left operand * @return IBool\Type whether all of the items of * the list evaluate to false */ public static function or_(IArrayList\Type $xs) : IBool\Type { return IArrayList\Module::any($xs, function (IBool\Type $x, IInt32\Type $i) : IBool\Type { return $x; }); }