selectPairs(x, f)
selectPairs(n, x, f)
f(k,v)
i1 : x = hashTable{(1, 2), (2, 4), (3, 6), (4, 8), (5, 10)} o1 = HashTable{1 => 2 } 2 => 4 3 => 6 4 => 8 5 => 10 o1 : HashTable
i2 : selectPairs(x, (k,v) -> odd(k + v)) o2 = HashTable{1 => 2 } 3 => 6 5 => 10 o2 : HashTable
i3 : selectPairs(2, x, (k, v) -> odd(k + v)) o3 = HashTable{1 => 2} 3 => 6 o3 : HashTable
The object selectPairs is a compiled function.