Method code for $list.getkey()

[Turn off line numbering]
  1: arg l, key;
  2: var i, x;
  3: 
  4: if (!(x = find i in [1 .. l.length()] where (l[i][1] == key)))
  5:     throw(~keynf, "Key not found.");
  6: return l[x][2];

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon