From 594370a2a381545aea8d0631a86f422f84ee2792 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 19 Aug 2010 22:34:22 +0000 Subject: Generalise `cons': a call to any symbol beginning with an uppercase character (i.e. a type symbol), e.g. (Thing 2), is a call to a type constructor which creates a Tup containing the arguments, with the symbol as the first element in the type expression, e.g. (Thing 2) has type (Thing Int) and compiles to a tuple containing a single Int. The type constructor `Tup' can be used as a `cons' replacement to construct generic tuples. git-svn-id: http://svn.drobilla.net/resp/resp@264 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- test/tup.resp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/tup.resp b/test/tup.resp index 17d59cb..e856f81 100644 --- a/test/tup.resp +++ b/test/tup.resp @@ -1,4 +1,4 @@ -(def t (cons 1 2 3 4 5)) +(def t (Tup 1 2 3 4 5)) (. t 0) (. t 1) (. t 2) -- cgit v1.2.1