5

I want to write Lisp/Scheme/Clojure code like this

(map inc (range 0 5)) 

And have it visualized somewhat like this

map -- inc
   \\
       range -- 0
           \  
             -- 5

I want to see the tree change in real-time as I manipulate my expression. As trees become large the layout will become important.

Are there any tools that do this? I suspect something might exist in the Emacs world.

MRocklin
  • 55,641
  • 23
  • 163
  • 235
  • not yet, but I'm working on something similar... – Hendekagon Nov 29 '12 at 22:57
  • Check out these questions: https://stackoverflow.com/questions/54621805/visualize-arbitrary-tree-in-racket-using-tree-layout https://stackoverflow.com/questions/54692309/how-to-list-all-intermediate-steps-of-evaluation-in-scheme Have you made any progress regards to this your question? – X10D May 01 '20 at 11:41

1 Answers1

2

the Light Table project is aiming to create an IDE with this sort of visibility as one of it's more important features. The idea is that it displays the evaluations results right next to the code it's self. Not quite a tree view like you are asking though it's a similar concept.

For a less intrusive change the tools.trace package can help make things more visible

Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284