Methods

filterΒΆ

filter(h:Hash, predicate:Any)

Filter hash. Build new hash with kev-value pairs selected by predicate.
Source: stdlib.ngs:1681

h

Source hash

predicate

Test function to be called with one key and one value at a time

Example

{'a': 1, 'b': 2}.filter(F(k, v) k == 'a')  # {'a': 1}