literal phrase ⇒ token, literal phrase ⇒ token, expression phrase ⇒ Map, expression phrase ⇒ natural number?, block phrase ⇒ []→boolean
Source: /avail/Avail/Foundation/Concurrency
Categories: Collections, Maps
Concurrently apply predicate to each consecutive pair of aMap, collecting elements for which predicate answered true into a new map.
| Position | Name | Type | Description | |
|---|---|---|---|---|
| Parameters | ||||
| 1 | keyPhrase | literal phrase ⇒ token | A literal phrase holding a synthetic literal token whose value is the name of the loop key variable of the map pair. | |
| 2 | valuePhrase | literal phrase ⇒ token | A literal phrase holding a synthetic literal token whose value is the name of the loop value variable of the map pair. | |
| 3 | aMap | expression phrase ⇒ Map | An expression phrase that yields the map to iterate over | |
| 4 | optionalLimit | expression phrase ⇒ natural number? |
If specified, then the maximum number of worker fiber s permitted to run in parallel. If not specified, then permit default maximum worker fibers worker fiber s to run in parallel.
|
|
| 5 | predicate | block phrase ⇒ []→boolean | A filter function that accepts an arbitrary key-value pair of the map and answers true if the element should be accumulated into the result. | |
| Returns | map | A map of elements from aMap for which predicate answered true. | Raises | |
| worker exception | If any of the forked workers raise an exception. | |||