Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
LEHR-UND FORSCHUNGSGEBIET INFORMATIK II RWTH Aachen D-52056 Aachen GERMANY
 

Summary: RHEINISCH-
WESTF 
ALISCHE
TECHNISCHE
HOCHSCHULE
AACHEN
LEHR- UND FORSCHUNGSGEBIET INFORMATIK II
RWTH Aachen  D-52056 Aachen  GERMANY
http://www-i2.informatik.rwth-aachen.de/lufgi2.html
Prof. Dr. J urgen Giesl
Darius Dlugosz
Exercises Functional Programming { Sheet 2
Solutions will be collected until Thursday, May 10, 2001.
Exercise 1 (3 points)
De ne the data structure Integer for numbers of arbitrary precision as an instance of class
Eq; Ord; Num and Show. The instance of the classes Eq shall contain the declaration for methods
(==), (= =), Ord requires the methods (<); (>); (<=); (>=); max and min, Num requires the
methods (+) (addition), ( ) (subtraction), () (multiplication), (=) (division), negate (reverses
the algebraic sign) and Show the method show.
Hint: The proper representation of Integer looks like [Int].

  

Source: Ábrahám, Erika - Fachgruppe Informatik, Rheinisch Westfälische Technische Hochschule Aachen (RWTH)

 

Collections: Computer Technologies and Information Sciences