我还是个新手。我正在尝试导入方案中的模块“排序”。我尝试了从(加载排序)到(打开排序),(导入排序)的所有方法。我能够使用
,open sorting 当我在计划狂欢的时候。但是,我希望将模块导入到方案文件中。我正在使用scheme48
发布于 2019-04-26 04:44:41
您需要使用模块语言。
更多细节可以在这里找到:http://community.schemewiki.org/?scheme48-module-system
基本上,不是只写一个普通的方案文件,而是foo.scm:
;; foo.scm
(define (hello) (display "Hello World!"))您需要使用模块语言
;; foo2.scm
;; this is not scheme, it's the module language
(define-structure hello (export hello)
(open scheme)
;; or others here
(begin
;; this is Scheme
(define (hello) (display "Hello World!"))))您可以在此处了解有关模块语言的更多信息:http://s48.org/1.8/manual/manual-Z-H-5.html
https://stackoverflow.com/questions/54856696
复制相似问题