Go backward to Representation
Go up to Lists
Go forward to Constructors

Definition

List<T> l
List<T> l(h, t)
      T h
      List<T> t

Specification: Defines a list handle l.

  1. In the first form, l is bound to an empty list.
  2. In the second form, l is bound to a new list cell with head element h and tail list t. This definition is equivalent to 
    List<T> l
    l.cons(h, t)
    which is in turn equivalent to but more efficient than
    List<T> l
    l = Cons(h, t)

Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: main.tex,v 1.10 1996/04/04 11:45:47 schreine Exp

Prev Up Next