I don't know exactly what the problem is even if I use the translator.
Does the defined datatype 'a tree
and val ex
mean to do in-order or prefix through lisp notation?
Or should I implement it in ML like listening?
I haven't solved a lot of questions, so I don't know exactly what I'm asking for, but I don't know the source of this problem, so there's no place to ask.
The val ex = ...
is just an example tree.
It seems like the question is asking you to do two things:
prettyprint
, a function which takes a string tree
as input, traverses the tree in-order, and converts it to the Lisp notation. The output should be a string
.deepreverse
, a function which takes any tree as input and produces a new tree. The in-order traversal of the output tree should be reversed.