diff options
author | Björn Gustavsson <[email protected]> | 2016-12-19 12:22:41 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2016-12-19 12:22:41 +0100 |
commit | e083566ce098a2cf20a414ccd5ff0e1187c1f645 (patch) | |
tree | 8447b49483313bdc23cf10dd46a97db94935fdd8 /lib/stdlib/doc/src | |
parent | b460143246eb207b505a554bf15d90655341dcbe (diff) | |
parent | a2d92dff3a8acc534daeeb3dea5edda406a6ab0d (diff) | |
download | otp-e083566ce098a2cf20a414ccd5ff0e1187c1f645.tar.gz otp-e083566ce098a2cf20a414ccd5ff0e1187c1f645.tar.bz2 otp-e083566ce098a2cf20a414ccd5ff0e1187c1f645.zip |
Merge pull request #1290 from bjorng/bjorn/stdlib/take
Add take/2 to all dictionary modules
OTP-14102
Diffstat (limited to 'lib/stdlib/doc/src')
-rw-r--r-- | lib/stdlib/doc/src/dict.xml | 10 | ||||
-rw-r--r-- | lib/stdlib/doc/src/gb_trees.xml | 22 | ||||
-rw-r--r-- | lib/stdlib/doc/src/orddict.xml | 9 |
3 files changed, 41 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/dict.xml b/lib/stdlib/doc/src/dict.xml index c926ff1b5b..c229a18721 100644 --- a/lib/stdlib/doc/src/dict.xml +++ b/lib/stdlib/doc/src/dict.xml @@ -106,6 +106,16 @@ </func> <func> + <name name="take" arity="2"/> + <fsummary>Return value and new dictionary without element with this value.</fsummary> + <desc> + <p>This function returns value from dictionary and a + new dictionary without this value. + Returns <c>error</c> if the key is not present in the dictionary.</p> + </desc> + </func> + + <func> <name name="filter" arity="2"/> <fsummary>Select elements that satisfy a predicate.</fsummary> <desc> diff --git a/lib/stdlib/doc/src/gb_trees.xml b/lib/stdlib/doc/src/gb_trees.xml index 790d4b8bf1..5cfff021c1 100644 --- a/lib/stdlib/doc/src/gb_trees.xml +++ b/lib/stdlib/doc/src/gb_trees.xml @@ -109,6 +109,28 @@ </func> <func> + <name name="take" arity="2"/> + <fsummary>Returns a value and new tree without node with key <c>Key</c>.</fsummary> + <desc> + <p>Returns a value <c><anno>Value</anno></c> from node with key <c><anno>Key</anno></c> + and new <c><anno>Tree2</anno></c> without the node with this value. + Assumes that the node with key is present in the tree, + crashes otherwise.</p> + </desc> + </func> + + <func> + <name name="take_any" arity="2"/> + <fsummary>Returns a value and new tree without node with key <c>Key</c>.</fsummary> + <desc> + <p>Returns a value <c><anno>Value</anno></c> from node with key <c><anno>Key</anno></c> + and new <c><anno>Tree2</anno></c> without the node with this value. + Returns <c>error</c> if the node with the key is not present in + the tree.</p> + </desc> + </func> + + <func> <name name="empty" arity="0"/> <fsummary>Return an empty tree.</fsummary> <desc> diff --git a/lib/stdlib/doc/src/orddict.xml b/lib/stdlib/doc/src/orddict.xml index 109b038cb5..26bbf499c6 100644 --- a/lib/stdlib/doc/src/orddict.xml +++ b/lib/stdlib/doc/src/orddict.xml @@ -113,6 +113,15 @@ </func> <func> + <name name="take" arity="2"/> + <fsummary>Return value and new dictionary without element with this value.</fsummary> + <desc> + <p>This function returns value from dictionary and new dictionary without this value. + Returns <c>error</c> if the key is not present in the dictionary.</p> + </desc> + </func> + + <func> <name name="filter" arity="2"/> <fsummary>Select elements that satisfy a predicate.</fsummary> <desc> |