mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-11 23:07:36 +02:00
Initial file
This commit is contained in:
parent
7b349fe764
commit
6acfc987f3
1 changed files with 15 additions and 0 deletions
15
scheme/load.sld
Normal file
15
scheme/load.sld
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
(define-library (scheme load)
|
||||||
|
(export load)
|
||||||
|
(import (scheme base)
|
||||||
|
(scheme eval)
|
||||||
|
(scheme file)
|
||||||
|
(scheme read))
|
||||||
|
(begin
|
||||||
|
(define (load filename)
|
||||||
|
(let ((exprs (call-with-input-file filename
|
||||||
|
(lambda (port)
|
||||||
|
(read-all port)))))
|
||||||
|
(for-each
|
||||||
|
(lambda (expr)
|
||||||
|
(eval expr))
|
||||||
|
exprs)))))
|
Loading…
Add table
Reference in a new issue