From 0375a20786f1e6eba9d128889f700b22d447021c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 17 Dec 2012 03:35:53 +0000 Subject: Fix calling functions that lexically enclose the current function. In particular this makes it possible to walk lists with match, since match clauses expand to fns. git-svn-id: http://svn.drobilla.net/resp/trunk@441 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- test/quote.resp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'test/quote.resp') diff --git a/test/quote.resp b/test/quote.resp index 741a7a7..638e81b 100644 --- a/test/quote.resp +++ b/test/quote.resp @@ -5,21 +5,20 @@ (Empty)) -(def l (quote (2 3))) +(def list (quote (2 a b c))) -(match l - (Symbol s) - 0 +(def (len l) + (match l + (Symbol s) + 1 - (Int i) - 1 + (Int i) + 1 - (List h t) - 2 - - (Empty) - 3) + (List h t) + (+ 1 (len t)) + + (Empty) + 0)) -;(def (car l) -;(. l 0) -;l +(len list) \ No newline at end of file -- cgit v1.2.1