Hey Guys,
I find this little tid-bit useful, it works like the unix apropos command.
Instead of waiting for me to get my tree merged, I'd thought I'd let someone
else commit it; if it seems useful for others.
I'm also planning on integrating this with the helpfile function at some
point.
-Scott
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; apropos
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; usage: (apropos "foo") will return a list of all namespace-mapped-symbols
with "foo" in them
(define (apropos s)
(let* ([apropos-list (map symbol->string (namespace-mapped-symbols))]
[apropos-regex (lambda (s)
(let ((al (filter (lambda (l) (regexp-match s l)) apropos-list)))
al))])
(apropos-regex (string-append ".*" s ".*"))))