Section Notes (1/15/2004)

Anonymous feedback

You can now send me anonymous feedback here. You can mention what you want discussed in section, or things you'd like done differently about the sections, or anything you like. Thank you for those who did send me feedback messages, I really appreciate them! Keep them coming.

Sundry items on ML

Some details about drawing diagrams for homework

Concatenating lists

There was a question about how to append something to a list (as opposed to prepending it with the :: cons constructor). The concatentation operator for lists is @. It is an infix operator and its parameters must be two values of type list. Here is an example.
[1,2,3] @ [4,5] = [1,2,3,4,5];
Here, the list [1, 2, 3] and [4, 5] are concatenated together to make a new list [1,2,3,4,5]. An important thing to note here are that both arguments must be of a list type, so
3 @ [4,5]

[3,4] @ 5

3 @ 4
would all not work, because in each one of these cases, at least one of the arguments are int, rather than lists. (Side note: something thing to note is that the @ operator isn't really anything special, all it actually does behind the scenes when you run it is recursively construct a list using :: cons.)
More to come, I've put this up so far so that you know what to do for the homework.