From 7ea4b02460021d69b19ca373b5957b87cc468b1a Mon Sep 17 00:00:00 2001 From: John Warwick Date: Sun, 12 Jan 2014 07:46:23 +0800 Subject: [PATCH] Dict.Behaviour doc cleanup --- lib/elixir/lib/dict/behaviour.ex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/elixir/lib/dict/behaviour.ex b/lib/elixir/lib/dict/behaviour.ex index 8711ab2ca40..8a1e5e1ef9d 100644 --- a/lib/elixir/lib/dict/behaviour.ex +++ b/lib/elixir/lib/dict/behaviour.ex @@ -1,5 +1,7 @@ defmodule Dict.Behaviour do @moduledoc """ + Default implementations for some required functions in the `Dict` module. + This module makes it easier to create your own `Dict` compliant module, by providing default implementations for some required functions. @@ -13,16 +15,16 @@ defmodule Dict.Behaviour do # override default implementations if needed end - The client module must contain following functions: + The client module must contain the following functions: * `delete/2` - * `fetch/2`, + * `fetch/2` * `put/3` * `reduce/3` * `size/1` * `update/4` - All of them are part of the Dict behaviour, so no extra functions are + All of which are part of the `Dict` behaviour, so no extra functions are actually required. Based on these functions, `Dict.Behaviour` generates default implementations @@ -42,7 +44,7 @@ defmodule Dict.Behaviour do * `to_list/1` * `values/1` - All of the functions are defined as overridable, so you can provide your own + All of these functions are defined as overridable, so you can provide your own implementation if needed. Note you can also test your custom module via `Dict`'s doctests: