add environment procedure
This commit is contained in:
parent
076698c84a
commit
137a01e74e
|
@ -1087,6 +1087,19 @@
|
|||
(error "unsupported environment version" n)
|
||||
'(scheme r5rs)))
|
||||
|
||||
(define environment
|
||||
(let ((counter 0))
|
||||
(lambda specs
|
||||
(let ((library-name `(picrin @@my-environment ,counter)))
|
||||
(set! counter (+ counter 1))
|
||||
(eval
|
||||
`(define-library ,library-name
|
||||
,@(map (lambda (spec)
|
||||
`(import ,spec))
|
||||
specs))
|
||||
'(scheme base))
|
||||
library-name))))
|
||||
|
||||
(export null-environment
|
||||
scheme-report-environment
|
||||
))
|
||||
environment))
|
||||
|
|
Loading…
Reference in New Issue