hhvm / user-documentation

Documentation for those that use HHVM and write Hack code.
http://docs.hhvm.com/
Other
129 stars 159 forks source link

Add insertion order note to `keyset` documentation #1346

Open kostmo opened 1 year ago

kostmo commented 1 year ago

Please complete the information below:

Where is the problem?

Keyset documentation: https://docs.hhvm.com/hack/arrays-and-collections/vec-keyset-and-dict#keyset

What is the problem?

It should be noted that keysets preserve insertion order just like dict. The dict documentation includes the note:

dicts are ordered according to the insertion order.

This note should be replicated for keysets, as in:

A keyset can only contain string or int values. keysets are ordered according to the insertion order.


Please don't change anything below this point.