(define impc:ti:adhoc-scheme-wrapper
(lambda (polyname funcname)
`(define ,(string->symbol polyname)
(lambda args
(if (and (not (null? args))
(symbol? (car args)))
(if (equal? (car args) 'xtlang)
',(string->symbol funcname)
(if (null? (cdr args))
(eval (string->sexpr (string-append "(" ,funcname "." (symbol->string (car args)) ")")))
(eval (append (string->sexpr (string-append "(" ,funcname "." (symbol->string (car args)) ")"))
(list (cadr args))))))
(apply ,(string->symbol funcname) args))))))