(module mathematica mzscheme (require "ml.ss") (provide MathKernel MathLink? current-mathlink) (define current-mathlink (make-parameter #f (lambda (lp) (unless (or (not lp) (MathLink? lp)) (raise-type-error 'current-mathlink "MathLink/#f" lp)) lp))) (define (MathKernel) (let ((lp (init_and_openlink))) (current-mathlink lp) lp)))