| 1 |
;;; |
| 2 |
;;; spigot - 'spigot' extension module example |
| 3 |
;;; |
| 4 |
;;; Written by Shiro Kawai ([email protected]) |
| 5 |
;;; I put this program in public domain. Use it as you like. |
| 6 |
;;; |
| 7 |
|
| 8 |
;; This is a 'module definition' file. It contains define-module |
| 9 |
;; form, and the one that's loaded first when you say |
| 10 |
;; (use math.spigot) in your program. |
| 11 |
;; |
| 12 |
;; The define-module form shows the external interface of the module--- |
| 13 |
;; what modules it depends (with 'use' form. There's none in this example), |
| 14 |
;; and what identifiers it exports (with 'export' form). |
| 15 |
;; |
| 16 |
;; Then it loads the dynamally compiled object with 'dynamic-load'. |
| 17 |
|
| 18 |
;; Defines module |
| 19 |
(define-module math.spigot |
| 20 |
(export spigot-calculate-pi |
| 21 |
spigot-calculate-e)) |
| 22 |
(select-module math.spigot) |
| 23 |
|
| 24 |
(dynamic-load "math--spigot") |