filterk multimethod

Methods

filterk(h:Eachable2, predicate:Any) Source: stdlib.ngs:2573
Filter hash by keys, keeping matched

Example

{"a": 1, "b": 2, "ccc": 3}.filterk(/^.$/)    # {a=1, b=2}
{"aa": 1, "ab": 2, "ba": 3}.filterk(/^a/)    # {aa=1, ab=2}
{"aa": 1, "ab": 2, 10: 3}.filterk(Int)       # {10=3}
{10: "a", 20: "b", 30: "c"}.filterk(X > 10)  # {20=b, 30=c}