diff options
author | David Robillard <d@drobilla.net> | 2012-12-23 05:31:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-12-23 05:31:15 +0000 |
commit | 67319bf0410196787c753225f46057bc7c94beec (patch) | |
tree | 572e8f8989a903fde8be784de5dddbaa1938ecfe /test/quote.scm | |
parent | 0375a20786f1e6eba9d128889f700b22d447021c (diff) | |
download | resp-67319bf0410196787c753225f46057bc7c94beec.tar.gz resp-67319bf0410196787c753225f46057bc7c94beec.tar.bz2 resp-67319bf0410196787c753225f46057bc7c94beec.zip |
Move towards standard Scheme syntax.
git-svn-id: http://svn.drobilla.net/resp/trunk@442 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'test/quote.scm')
-rw-r--r-- | test/quote.scm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/quote.scm b/test/quote.scm new file mode 100644 index 0000000..4895d2e --- /dev/null +++ b/test/quote.scm @@ -0,0 +1,24 @@ +(def-type (Expr) + (Symbol Symbol) + (Int Int) + (List Expr Expr) + (Empty)) + + +(define list (quote (2 a b c))) + +(define (len l) + (match l + (Symbol s) + 1 + + (Int i) + 1 + + (List h t) + (+ 1 (len t)) + + (Empty) + 0)) + +(len list)
\ No newline at end of file |