0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

patch 8.2.0935: flattening a list with existing code is slow

Problem:    Flattening a list with existing code is slow.
Solution:   Add flatten(). (Mopp, closes #3676)
This commit is contained in:
Bram Moolenaar
2020-06-08 20:50:43 +02:00
parent ec98e93a82
commit 077a1e670a
8 changed files with 198 additions and 1 deletions

View File

@@ -541,6 +541,7 @@ static funcentry_T global_functions[] =
{"filter", 2, 2, FEARG_1, ret_any, f_filter},
{"finddir", 1, 3, FEARG_1, ret_string, f_finddir},
{"findfile", 1, 3, FEARG_1, ret_string, f_findfile},
{"flatten", 1, 2, FEARG_1, ret_list_any, f_flatten},
{"float2nr", 1, 1, FEARG_1, ret_number, FLOAT_FUNC(f_float2nr)},
{"floor", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_floor)},
{"fmod", 2, 2, FEARG_1, ret_float, FLOAT_FUNC(f_fmod)},