Skip to content

Instantly share code, notes, and snippets.

@orchid-hybrid
Created January 26, 2015 11:50
Show Gist options
  • Save orchid-hybrid/9b7e9516c721608be50f to your computer and use it in GitHub Desktop.
Save orchid-hybrid/9b7e9516c721608be50f to your computer and use it in GitHub Desktop.
Test case for loading library into sagittarius scheme
;; Test case for sagittarius scheme, using this library https://github.com/ilammy/sr
(load "sr/ck.sld")
(load "sr/ck/kernel.sld")
(load "sr/ck/lists.sld")
(load "sr/ck/maps.sld")
(define-library (match)
(import (rnrs)
(sr ck)
(sr ck kernel)
(sr ck lists)
(sr ck maps))
(export moo)
(begin
(define moo
($ ($quote ($map '($cons 'x) '((1) (2) (3))))))))
;; How to test that you can load CK macros into sagittarius
;; $ rlwrap sagittarius -L sr/
;; sash> (load "match.sld")
;; #t
;; sash> (import (match))
;; #<unspecified>
;; sash> moo
;; ((x 1) (x 2) (x 3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment