public function map(array $array, callable $callback): array
    {
        $result = [];
        foreach ($array as $key => $element) {
            $result[$key] = $callback($element, $key);
        }
        return $result;
    }