Examples

Type the following into Hope and observe the type.
  1. >: (1,3);
    >> (1, 3) : num # num
    

  2. >: (1,true,false);
    >> (1, true, false) : num # bool # bool
    
  3. >: ([1],true,56);
    >> ([1], true, 56) : list num # bool # num
    
  4. >: ([1,2],[true],45,1,false);
    >> ([1, 2], [true], 45, 1, false) : list num # list bool # num # num # bool
    

  5. >: ((1,2),[true],45,(1,false));
    >> ((1, 2), [true], 45, 1, false) : (num # num) # list bool # num # num # bool
    



s.danicic@gold.ac.uk
Sebastian Danicic BSc MSc PhD (Reader in Computer Science)
Dept of Computing, Goldsmiths, University of London, London SE14 6NW
Last updated 2010-12-29