Skip to content
Snippets Groups Projects
Commit 5e16bafa authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

The "function" argument in Array.map() and Array.filter() may now be a multiset.

Rev: lib/modules/Array.pmod:1.35
parent d4fb30bb
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,9 @@ mixed map(mixed arr, mixed fun, mixed ... args) ...@@ -53,6 +53,9 @@ mixed map(mixed arr, mixed fun, mixed ... args)
ret[e]=fun(arr[e],@args); ret[e]=fun(arr[e],@args);
return ret; return ret;
case "multiset":
return rows(fun, arr);
default: default:
error("Bad argument 2 to Array.map().\n"); error("Bad argument 2 to Array.map().\n");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment