Name
filter — Filter a Map
Synopsis
map
filter
( |
any
| KEY
, |
|
any
| VALUE
, |
|
map
| MAP
, |
|
blocl
| EXPR
) ; |
Parameters
-
any
KEY
-
any
VALUE
-
map
MAP
-
blocl
EXPR
Description
For each key/value pair of the map MAP the expression EXPR is evaluated in a new context, where the variable KEY is assigned to the key and VALUE to the value of the pair. If the expression evaluates to true, the key/value pair is appended to the returned map.
Usage
filter (`k, `v, $[1:"a", 2:"b", 3:3, 5:5], { return (k == v); }) -> $[3:3, 5:5]
|