Skip to content

Instantly share code, notes, and snippets.

@adh
Created March 29, 2009 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adh/87493 to your computer and use it in GitHub Desktop.
Save adh/87493 to your computer and use it in GitHub Desktop.
(define (get-object-documentation object)
(cond
((instance? object <function>)
(slot-ref object 'documentation))
((instance? object <form>)
(slot-ref object 'documentation))
((instance? object <macro>)
(get-object-documentation (slot-ref object 'procedure)))
(else "Unknown object")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment