public function testMapRecursive() { $array = array(1, 2, 3, 4, 5); $result = Arr::map(function ($number) { return $number * $number; }, $array); is(array(1, 4, 9, 16, 25), $result); $array = array(1, 2, 3, 4, 5, array(6, 7, array(8, array(array(array(9)))))); $result = Arr::map(function ($number) { return $number * $number; }, $array); is(array(1, 4, 9, 16, 25, array(36, 49, array(64, array(array(array(81)))))), $result); }