Search code examples
sml

(sml)Can anyone help me interpret the problem since I lack interpretation skills?


  • For your information, these problems are just solving what's circulating on some website.

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.


Solution

  • The val ex = ... is just an example tree.

    It seems like the question is asking you to do two things:

    1. Implement 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.
    2. Implement 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.