| CSC 8310 ML Quiz Villanova University, Spring 2001 David Matuszek |
Section 2 Name ____________________________________________ |
fun mung [] = []
| mung (x::y::rest) = (x * y)::(mung rest);
what is the value returned by each of the following function calls?
mung [1,2];
mung [1,2,3,4];
fun mapkin L = map (fn x => x mod 2 = 0) L;
what is the result of the following function calls?
mapkin [1,2,3];
mapkin [~2, ~1, 0, 1, 2];
#"a"
(3, 4.5)
op mod
round
explode
( )
and,
or, not.