Beispiel #1
0
 public function testFind()
 {
     $callable = function ($value, $key) {
         return 'a' === $value and 2 < $key;
     };
     $a = new ImmutableArray(['a', 'b', 'c', 'b', 'a']);
     $found = $a->find($callable);
     $this->assertTrue('a' === $found);
 }