Skip to content

Instantly share code, notes, and snippets.

@SaitoAtsushi
Created May 22, 2019 09:06
Show Gist options
  • Save SaitoAtsushi/45e6a4aca50a7d76e3e6ba6e71316a31 to your computer and use it in GitHub Desktop.
Save SaitoAtsushi/45e6a4aca50a7d76e3e6ba6e71316a31 to your computer and use it in GitHub Desktop.
Chez Scheme なら出来るライブラリ隠蔽のトリック
(library (huga)
(export foo)
(import (rnrs))
(define foo 'bar)
)
(library (hoge)
(export foo)
(import (huga))
)
;; hoge.sls はライブラリ (hoge) と結びついているので
;; (import (huga)) とは出来ない
(import (hoge)
(huga)) ;; hoge の後でなら huga を import できる。 順序を逆にするとエラー
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment