Exemplo n.º 1
0
 public function testFoldRight()
 {
     $map = new Map(["a" => 1, "b" => 2, "c" => 3, "d" => 3]);
     $this->assertEquals("3321", $map->foldRight(function ($v, $acc) {
         return (string) $acc . (string) $v;
     }));
 }