;; THIS IS A HELPER FUNCTION
;;
;; returns a (bind-lib-xtm) form for the named function
;; by using the xtm-closure-doc to get the type
;; function must already have been compiled into module
(define-macro (bind-lib-xtm-get-string name)
(let ((res (eval `(xtm-closure-doc ,name))))
(if (string? res)
`(sexpr->string '(bind-lib-xtm mathlib ,name ,(string->symbol res)))
`(sexpr->string '(bind-lib-xtm mathlib ,name ,(string->symbol (cdr res)))))))