Skip to content

Commit

Permalink
Add docs to Map
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Apr 17, 2023
1 parent 6963198 commit aebbf0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Data/Map.enso
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ from project import Error, Nothing, Any, Panic
for equality any objects that can appear in Enso - primitives, Atoms, values coming from
different languages, etc.

For keys that are not reflexive, like `Number.nan`, "Same Value Equality", from JavaScript
specification in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value-zero_equality,
is used. This means that both `Number.nan` and types with comparators that violate
reflexivity (e.g. their `compare` method always returns `Nothing`) can be used as keys
in the Map.

A single key-value pair is called an *entry*.

It is possible to pass a Map created in Enso to foreign functions, where it will be treated
Expand Down

0 comments on commit aebbf0b

Please sign in to comment.