COMP1011 Exercises for Week 02 | |
---|---|
Computing 1A 05s2 |
Last updated
Tue 19 Jul 2005 14:37
Mail cs1011@cse.unsw.edu.au |
This week we don't have tutorial exercises, but the following items should be revised to avoid problems with the lab exercises.
Int
and
Float
differ?
+
, -
,
*
, /
, div
, and mod
;
discuss the difference between /
and div
).
[x..y]
, [x,
y..x]
, sum
, and
product
)
++
, head
,
tail
, and length
)
The following definitions from the lecture should be understood:
module MyPrgm where inc :: Int -> Int inc x = x + 1 average :: Float -> Float -> Float average a b = (a + b) / 2.0Which rules have to be considered when choosing a name for