Submit this assignment electronically - instructions available soon.
You should do the assigment on-line. You can load a file into the
ML interpreter with use("filename");
. Once you have
your functions debugged, run them with several test cases to
demonstrate that they work. You can record the session with the unix
command script. Please edit the resulting typescript to remove
the garbage and make it easy for Kevin to grade.
#2("bob", "paul", "susan")
tl [2, 3, 4]
tl([2, 3, 4])
implode([#"a", #"b", #"c"])
hd (explode("Tom"))
tl ("Tom" :: ["Bob", "Mary"])
#4(3,4,5)
#2([1,2,3])
tl (tl (tl [1, 2]))
implode(["a", "b", "c"])
"Tom" :: ("Bob" :: "Mary")
[1, "a", #"a"]
length
function.)
[1, 2, 3, 4, 5]
, produce the output [2, 3, 4,
5, 1]
.
[1, 2,
3, 4, 5]
, produce the output [5, 1, 2, 3, 4]
.