more contexts

Started by newdep, March 10, 2006, 04:04:41 AM

Previous topic - Next topic

newdep

Probably a real easy one, but i cant find it ;(



How can I see how many and what contexts are currently active?



Norman.
-- (define? (Cornflakes))

pjot

#1
Maybe like this (run from MAIN context):




(dotimes (x (length (symbols))) (if (context? (eval (nth x (symbols)))) (println (nth x (symbols)))))



Or is this not what you are looking for?



Peter

pjot

#2
Even faster:




(dotree (s MAIN)(if (context? (eval s)) (println s)))





Peter