Skip to content

Commit 205e857

Browse files
Update about.md Keys for map can be of any type in access beh.
https://hexdocs.pm/elixir/Access.html "Access supports keyword lists (Keyword) and maps (Map) out of the box. Keywords supports only atoms keys, **keys for maps can be of any type**. Both return nil if the key does not exist:"
1 parent 8d533bd commit 205e857

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

concepts/access-behaviour/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The _Access Behaviour_ provides a common interface for retrieving key-based data
66

77
The [`Access`][access] module defines the callbacks required for the interface. The [`Map`][map] and [`Keyword`][keyword] modules then implement the required callbacks [`fetch/2`][map-fetch], [`get_and_update/3`][map-get-and-update], and [`pop/2`][map-pop]
88

9-
To use the behaviour, you may follow a bound variable with _square brackets_ and then use the key to retrieve the value associated with that key. Maps support atom and string keys, while keyword lists only atom keys.
9+
To use the behaviour, you may follow a bound variable with _square brackets_ and then use the key to retrieve the value associated with that key. Keys for maps can be of any type, while keyword lists only atom keys.
1010

1111
```elixir
1212
# Atom as key

0 commit comments

Comments
 (0)