Visualize s-expressions in real-time

701 Views Asked by At

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.

1

There are 1 best solutions below

1
On

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