1/4: add real HSL to HHVM repo :)
[hiphop-php.git] / hphp / hsl / src / keyset / introspect.php
blobfd0f406d1727ef01ed47fba360dd3ecc5289eca4
1 <?hh
2 /*
3 * Copyright (c) 2004-present, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the root directory of this source tree.
9 */
11 namespace HH\Lib\Keyset;
13 use namespace HH\Lib\C;
15 /**
16 * Returns whether the two given keysets have the same elements, using strict
17 * equality. To guarantee equality of order as well as contents, use `===`.
19 * Time complexity: O(n)
20 * Space complexity: O(1)
22 function equal<Tv as arraykey>(
23 keyset<Tv> $keyset1,
24 keyset<Tv> $keyset2,
25 )[]: bool {
26 return $keyset1 == $keyset2;