HH\Lib\Keyset\sort

This API is part of the Hack Standard Library, not HHVM itself.
Facebook Engineer?

This function is available as Keyset\sort() in Facebook's www repository.

Returns a new keyset sorted by the values of the given Traversable

Description

namespace HH\Lib\Keyset;

function sort<Tv as arraykey>(
  Traversable<Tv> $traversable,
  ?(function(Tv,Tv):int) $comparator = null,
): keyset<Tv>;

If the optional comparator function isn't provided, the values will be sorted in ascending order.

Parameters