Skip to content

Commit 77e6022

Browse files
committed
Merge pull request #3749 from Havvy/patch-1
Add example to the to_list function
2 parents b108847 + bdca920 commit 77e6022

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/elixir/lib/dict.ex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,13 @@ defmodule Dict do
872872
@doc """
873873
Returns a list of key-value pairs stored in `dict`.
874874
No particular order is enforced.
875+
876+
## Examples
877+
878+
iex> dict = dict_impl.new
879+
iex> dict = Dict.put(dict, :a, 1)
880+
iex> Dict.to_list(dict)
881+
[a: 1]
875882
"""
876883
@spec to_list(t) :: list
877884
def to_list(dict) do

0 commit comments

Comments
 (0)