diff options
author | David Robillard <d@drobilla.net> | 2010-08-19 22:34:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-08-19 22:34:22 +0000 |
commit | 594370a2a381545aea8d0631a86f422f84ee2792 (patch) | |
tree | be71de4a2d9ec83d634c6978daa38c76428b58e7 /test | |
parent | 60f4383ee1df7c326ac887b7c1750575c3becbb8 (diff) | |
download | resp-594370a2a381545aea8d0631a86f422f84ee2792.tar.gz resp-594370a2a381545aea8d0631a86f422f84ee2792.tar.bz2 resp-594370a2a381545aea8d0631a86f422f84ee2792.zip |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/tup.resp | 2 |
1 files changed, 1 insertions, 1 deletions
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) |