From 1703085b25fa82459e306737ae88ee6fb0ece910 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 28 Jul 2017 11:54:40 +0200 Subject: Resolve #1: implement lists (tuples have been done earlier) --- examples/tuples.sil | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 examples/tuples.sil (limited to 'examples/tuples.sil') 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))); +} -- cgit v1.2.3