HH\Lib\Dict\filter_nulls

Meta Engineer?

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

Given a KeyedTraversable with nullable values, returns a new dict with null values removed

namespace HH\Lib\Dict;

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

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

Parameters

Returns

  • dict<Tk, Tv>