views:

204

answers:

3

I'm a newbie to lisp. I'm evaluating/testing a browser based application presumably written in common lisp. Apart from the browser based interface, the software provides a 'Listener' window with a 'CL-User >' REPL prompt.

I wish to examine the list of functions, symbols, and packages from the REPL prompt. So that I could co-relate the frontend functionality with what is exposed via the REPL.

Google search is futile for me as it leads to tutorials and resources that teaches lisp step-by-step.

Any hints, pointers on examining the state via REPL will be much appreciated.

+2  A: 
(let ((lst ()))                                                     
   (do-all-symbols (s lst)
     (when (fboundp s) (push s lst)))
   lst)

Pretty much taken as-is from here.

spong
I did land on the page you suggested via google search prior to posting here. But was not able to figure out the above on my own. Thanks for the crystal clear code.
Balaji Sowmyanarayanan
+2  A: 

To list all the packages (duh):

(list-all-packages)

To find functions exported from a particular package:

(loop for x being the external-symbol of "CL" when (fboundp x) collect x)
huaiyuan
Easy to understand one liner for the 'procedurally spoiled'. Thanks.
Balaji Sowmyanarayanan
+3  A: 
wbowers
Aha (apropos-list) what the doctor ordered. Thanks for the link too.
Balaji Sowmyanarayanan