diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-08-09 12:50:49 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-08-09 12:50:49 -0400 |
commit | e699687ba2ff0cc2c7c185c4d99669f77093473b (patch) | |
tree | ac9cfeac791b20f1763c72069c1fb1b61a364b24 /tests | |
parent | bd2d0fe6c8deedc88d985b2c38978b730ff0cd19 (diff) |
Tuples syntactic sugar
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tuple.lac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/tuple.lac b/tests/tuple.lac new file mode 100644 index 00000000..fb14aad9 --- /dev/null +++ b/tests/tuple.lac @@ -0,0 +1,13 @@ +val x = (1, 2.0, "Hi") + +val x1 = x.1 +val x2 = x.2 +val x3 = x.3 + +val y : int * float * string = x + +val bizarro_x = case x of (a, b, c) => (c, a, b) + +val main : unit -> page = fn () => <html><body> + {cdata bizarro_x.1} +</body></html>
\ No newline at end of file |