diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/quote.resp | 27 |
1 files changed, 13 insertions, 14 deletions
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 |