Define case toList(leaf(n)) = [n] case toList(nonleaf(x,y)) = toList(x) ++ toList(y) %Define