Get a list of variables currently in scope
Posted: Thu Feb 09, 2012 8:42 am
Is there a way to get a list of all of the symbols currently in scope?
For example
GET-ALL-TEST-RESULTS would return (test-1 test-2 test-3 test-4)
That way if I want to add a test I just add the clause in the let. Or is there a completely different way of doing this that I haven't thought of?
For example
Code: Select all
(defun test-conditions (state)
(let ((test-1 (list "Test 1 Name"
(lambda (state) <<<run tests on state return a value>>>)))
(test-2 (list "Test 2 Name"
(lambda (state) <<<run tests on state return a value>>>)))
(test-3 (list "Test 3 Name"
(lambda (state) <<<run tests on state return a value>>>)))
(test-4 (list "Test 4 Name"
(lambda (state) <<<run tests on state return a value>>>))))
(PROCESS RESULTS (GET-ALL-TEST-RESULTS))))
That way if I want to add a test I just add the clause in the let. Or is there a completely different way of doing this that I haven't thought of?