diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-04-10 22:48:55 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-22 23:24:53 +0200 |
commit | 65bd8ade865eebe0d8a3c3210a4e2e9f334e229f (patch) | |
tree | 535443ee4deba6136b397a4b04a325d0e83cdea3 /lib/stdlib/src/maps.erl | |
parent | f2cef11a16d8d5f643cdf913b46042db71bff867 (diff) | |
download | otp-65bd8ade865eebe0d8a3c3210a4e2e9f334e229f.tar.gz otp-65bd8ade865eebe0d8a3c3210a4e2e9f334e229f.tar.bz2 otp-65bd8ade865eebe0d8a3c3210a4e2e9f334e229f.zip |
erts: Add BIF maps:take/2
Diffstat (limited to 'lib/stdlib/src/maps.erl')
-rw-r--r-- | lib/stdlib/src/maps.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/stdlib/src/maps.erl b/lib/stdlib/src/maps.erl index a52928f77f..a8c2740617 100644 --- a/lib/stdlib/src/maps.erl +++ b/lib/stdlib/src/maps.erl @@ -28,7 +28,7 @@ %%% BIFs -export([get/2, find/2, from_list/1, is_key/2, keys/1, merge/2, - new/0, put/3, remove/2, + new/0, put/3, remove/2, take/2, to_list/1, update/3, values/1]). -spec get(Key,Map) -> Value when @@ -102,6 +102,13 @@ put(_,_,_) -> erlang:nif_error(undef). remove(_,_) -> erlang:nif_error(undef). +-spec take(Key,Map1) -> {Value,Map2} | error when + Key :: term(), + Map1 :: map(), + Value :: term(), + Map2 :: map(). + +take(_,_) -> erlang:nif_error(undef). -spec to_list(Map) -> [{Key,Value}] when Map :: map(), |