HH\Lib\Dict\reverse

Meta Engineer?

This is available as Dict\reverse in the www repository.

Returns a new dict with the original entries in reversed iteration order

namespace HH\Lib\Dict;

function reverse<Tk as arraykey, Tv>(
  KeyedTraversable<Tk, Tv> $traversable,
): dict<Tk, Tv>;

Time complexity: O(n) Space complexity: O(n)

Parameters

Returns

  • dict<Tk, Tv>