| | |
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 9
Solutions will be collected until Thursday, July 19, 2001.
Exercise 1 (4 points)
Translate the following Haskell-expressions into lambda terms and reduce them with WHNO-
reduction using the ! Æ -relation, where Æ is the set of rules from denition 3.3.5:
(a) let not' = \x -> if x == True then False else True in not' True
(b) let half = \x -> if x <= 1 then 0 else half (minus x 1) in half 3
(c) let double = \x -> if x == 0 then 0 else (plus 2 (double (x - 1)))
in double 2
|