New files

This commit is contained in:
Justin Ethier 2015-04-28 10:34:51 -04:00
parent de5fcb2039
commit 9a8a35588e
3 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,15 @@
;;;
;;; Justin Ethier
;;; husk scheme
;;;
;;; A sample program demonstrating how to use libraries.
;;; To run, go to the directory containing this file and
;;; execute it using huski:
;;;
;;; > huski hello.scm
;;;
(import (scheme base)
(libs lib2)
(rename (prefix (libs lib1) test-)))
(test-lib1-hello)

View file

@ -0,0 +1,16 @@
;;;
;;; Justin Ethier
;;; husk scheme
;;;
;;; A sample library
;;;
(define-library (libs lib1)
(export lib1-hello)
(import (scheme base)
(scheme write)
(libs lib2))
(begin
(define (internal-func)
(write lib2-hello))
(define (lib1-hello)
(internal-func))))

View file

@ -0,0 +1,12 @@
;;;
;;; Justin Ethier
;;; husk scheme
;;;
;;; A sample library
;;;
(define-library (libs lib2)
(import (scheme base))
(export lib2-hello)
(begin
(define lib2-hello
"Hello from library #2")))