O'Reilly logo
  • Mashrur Mia thinks this is interesting:

Now each abstract syntax tree


Cover of Understanding Computation


the displayed tree as a one liner like:

1 * 2 + 3 * 4

does not really show the structure of the tree. The default presentation did a better job, no?

<struct Add

  left=#&lt;struct Multiply       
      left=#&lt;struct Number value=1&gt;,       
      right=#&lt;struct Number value=2&gt;    
   right=#&lt;struct Multiply       
       left=#&lt;struct Number value=3&gt;,       
       right=#&lt;struct Number value=4&gt;     


(see the WARNING note below that addresses this)