| | |
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
Ren´e Thiemann
Exercises Functional Programming Sheet 2
Solutions will be collected until Thursday, Oct 31, 2002 in the exercise course.
Exercise 1 ( 2 points)
Look at the functions take and from, which take some elements from a list and create a list.
take :: Int -> [a] -> [a]
take 0 xs = []
take (n+1) (x:xs) = x:take n xs
from :: Int -> [Int]
|