patch 8.2.1969: Vim9: map() may change the list or dict item type

Problem:    Vim9: map() may change the list or dict item type.
Solution:   Add mapnew().
This commit is contained in:
Bram Moolenaar
2020-11-09 18:31:39 +01:00
parent 8cebd43e97
commit ea696852e7
7 changed files with 205 additions and 53 deletions

View File

@ -644,6 +644,7 @@ List manipulation: *list-functions*
deepcopy() make a full copy of a List
filter() remove selected items from a List
map() change each List item
mapnew() make a new List with changed items
reduce() reduce a List to a value
sort() sort a List
reverse() reverse the order of a List
@ -669,6 +670,7 @@ Dictionary manipulation: *dict-functions*
extend() add entries from one Dictionary to another
filter() remove selected entries from a Dictionary
map() change each Dictionary entry
mapnew() make a new Dictionary with changed items
keys() get List of Dictionary keys
values() get List of Dictionary values
items() get List of Dictionary key-value pairs