2014-08-03 01:19:55 -04:00
|
|
|
(define-library (scheme eval)
|
2014-09-08 07:20:08 -04:00
|
|
|
(import (picrin base))
|
2014-08-03 01:19:55 -04:00
|
|
|
|
|
|
|
(define environment
|
|
|
|
(let ((counter 0))
|
|
|
|
(lambda specs
|
2015-06-16 09:51:49 -04:00
|
|
|
(let ((library-name `(picrin @@my-environment ,(string->symbol (number->string counter)))))
|
2014-08-03 01:19:55 -04:00
|
|
|
(set! counter (+ counter 1))
|
|
|
|
(eval
|
|
|
|
`(define-library ,library-name
|
2015-06-16 09:51:49 -04:00
|
|
|
,@(map (lambda (spec) `(import ,spec)) specs))
|
|
|
|
(library-environment (find-library '(scheme base))))
|
|
|
|
(library-environment (find-library library-name))))))
|
2014-08-03 01:19:55 -04:00
|
|
|
|
2014-09-08 07:20:08 -04:00
|
|
|
(export environment eval))
|