aboutsummaryrefslogtreecommitdiff
path: root/examples/tuples.sil
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tuples.sil')
-rw-r--r--examples/tuples.sil11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/tuples.sil b/examples/tuples.sil
new file mode 100644
index 0000000..28c6958
--- /dev/null
+++ b/examples/tuples.sil
@@ -0,0 +1,11 @@
+Int fst((Int, Int) tup) {
+ return tup._1;
+}
+
+(Int, Int) swap((Int, Int) tup) {
+ return (tup._2, tup._1);
+}
+
+Int main() {
+ return fst(swap((1,10)));
+}