Go backward to Use of Packages
Go up to Top
Go forward to Ada Packages

Packages and Abstract Data Types

type Point = Real x Real
type Point1 =
   {makepoint: (Real x Real) -> Point,
      x_coord: Point x Real,
      y_coord: Point x Real}

value point1: Point1 =
   {makepoint = fun(x:Real, y:Real)(x, y),
      x_coord = fun(p:Point) fst(p),
      y_coord = fun(p:Point) snd(p)}


Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: understand.tex,v 1.1 1996/06/12 09:38:21 schreine Exp schreine

Prev Up Next