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