Box-and-Arrow Diagrams

Linked list:
val a = [3,4];
LINKED LIST sample box and arrow diagram
Tuple:
val b = ("hi", 10, [20]);
TUPLE sample box and arrow diagram
Record:
val c = {x=100, y=200, z="there"};
RECORD sample box and arrow diagram

Examples

These are the examples we went over in class today:

1

val kelp = [1,2,3];
val seaweed = tl(kelp);
val algae = 5 :: 6 :: seaweed;
[Box and arrow diagram for problem 5a]

2

val urchin = { greetings=["hi","hello","howdy"],
               days=365,
               birthday=("February",29,2000) };
val anemone = #greetings(urchin);
val starfish = (hd(anemone), "there");
[Box and arrow diagram for problem 5b]