File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
defmodule Dict.Behaviour do
2
2
@ moduledoc """
3
+ Default implementations for some required functions in the `Dict` module.
4
+
3
5
This module makes it easier to create your own `Dict` compliant
4
6
module, by providing default implementations for some required functions.
5
7
@@ -13,16 +15,16 @@ defmodule Dict.Behaviour do
13
15
# override default implementations if needed
14
16
end
15
17
16
- The client module must contain following functions:
18
+ The client module must contain the following functions:
17
19
18
20
* `delete/2`
19
- * `fetch/2`,
21
+ * `fetch/2`
20
22
* `put/3`
21
23
* `reduce/3`
22
24
* `size/1`
23
25
* `update/4`
24
26
25
- All of them are part of the Dict behaviour, so no extra functions are
27
+ All of which are part of the ` Dict` behaviour, so no extra functions are
26
28
actually required.
27
29
28
30
Based on these functions, `Dict.Behaviour` generates default implementations
@@ -42,7 +44,7 @@ defmodule Dict.Behaviour do
42
44
* `to_list/1`
43
45
* `values/1`
44
46
45
- All of the functions are defined as overridable, so you can provide your own
47
+ All of these functions are defined as overridable, so you can provide your own
46
48
implementation if needed.
47
49
48
50
Note you can also test your custom module via `Dict`'s doctests:
You can’t perform that action at this time.
0 commit comments