mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
New files
This commit is contained in:
parent
de5fcb2039
commit
9a8a35588e
3 changed files with 43 additions and 0 deletions
15
examples/hello-library/hello.scm
Normal file
15
examples/hello-library/hello.scm
Normal 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)
|
16
examples/hello-library/libs/lib1.sld
Normal file
16
examples/hello-library/libs/lib1.sld
Normal 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))))
|
12
examples/hello-library/libs/lib2.sld
Normal file
12
examples/hello-library/libs/lib2.sld
Normal 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")))
|
Loading…
Add table
Reference in a new issue