export function search<K, V>(x: Entries<K, V>, ft: TestFunction<K, V>): K {
  for (var [k, v] of x)
    if (ft(v, k, x)) return k;
}