| | |
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
LuFG
Informatik II
Prof. Dr. J urgen Giesl
Rene Thiemann
Exercises Functional Programming { Sheet 4
Solutions will be collected until Thursday, Nov 14, 2002 in the exercise course.
Exercise 1 (7 points)
The application of the function foldr () e xs yields a term in which the list elements are
combined with the operator in right{associative way.
foldr () e [a 1 ,: : :,a n ] = a 1 (a 2 : : : (a n e): : :))
(a) Dual to foldr dene the function foldl where the parentheses associate to the left.
|