indexed

func indexed(f : Map) -> set of Entity*Entity
  return {all [x, f(x)] for x in domain(f)]}

Returns a set of [x, f(x)] pairs corresponding to a map, list or string. For example:

indexed(`abc') = {[1 `a'] [2 `b'] [3 `c']}
indexed([10 20 30]) = {[1 10] [2 20] [3 30]}
mkmap(indexed(mkmap({[`a' `A'] [`b' `B']}))) = mkmap([`a' `A'] [`b' `B'])
Opposite of: mkmap.
Partly duplicates: mkset and range
See also: index.
Herman Venter

This is Slim documentation as snarfed on 27 May 1999 by dB.