domain

func domain(f : Map) -> Set
  return {all x for x,y in indexed(f)}

Returns the domain of the given map, list or string. For example:
  domain(mkmap({[0 0] [1 10]})) = {0 1}
  domain([10 20]) = {1 2}
  domain(`abc') = {1 2 3}
See also: range.
Herman Venter

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