diff options
-rw-r--r-- | lib/stdlib/src/maps.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stdlib/src/maps.erl b/lib/stdlib/src/maps.erl index b8b284db65..e72e590834 100644 --- a/lib/stdlib/src/maps.erl +++ b/lib/stdlib/src/maps.erl @@ -24,7 +24,7 @@ map/2, size/1, without/2, - only/2, + with/2, get/3 ]). @@ -204,11 +204,11 @@ without(Ks, M) when is_list(Ks), is_map(M) -> maps:from_list([{K,V}||{K,V} <- maps:to_list(M), not lists:member(K, Ks)]). --spec only(Ks, Map1) -> Map2 when +-spec with(Ks, Map1) -> Map2 when Ks :: [K], Map1 :: map(), Map2 :: map(), K :: term(). -only(Ks, M) when is_list(Ks), is_map(M) -> +with(Ks, M) when is_list(Ks), is_map(M) -> maps:from_list([{K,V}||{K,V} <- maps:to_list(M), lists:member(K, Ks)]). |