tuturto / apocrita

A very simple lisp, implemented in hy
MIT License
4 stars 0 forks source link

function to display current env #5

Open tuturto opened 8 years ago

tuturto commented 8 years ago

It would be useful to be able to query state of env (show currently defined symbols and their values). This probably should return a list of lists of list: a master list containing frames and each frame is a list of symbols defined there. Probably has to be a built in operation, as functions don't normally have access to shadowed symbols. Depends on #4 - list datatype.

=> (define a 5)
5
=> (define b 6)
6
=> (list-env)
(((a 5) (b 6)))