summaryrefslogtreecommitdiff
path: root/test/closure.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2012-07-09 19:58:49 -0400
committerOri Bernstein <ori@eigenstate.org>2012-07-09 19:59:42 -0400
commit6f62b7bb0abfcf72d515f476d20c414d4b82f1d6 (patch)
tree2c8746d66664d73cb3a58ecac914c044e31999fe /test/closure.myr
parentee96b8a5cafc4811c1d4e253f843ac06426a6e5d (diff)
downloadmc-6f62b7bb0abfcf72d515f476d20c414d4b82f1d6.tar.gz
Start work towards closures.
- Add test for a closure - Don't capture globals: they don't need it.
Diffstat (limited to 'test/closure.myr')
-rw-r--r--test/closure.myr7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/closure.myr b/test/closure.myr
new file mode 100644
index 0000000..d03dbae
--- /dev/null
+++ b/test/closure.myr
@@ -0,0 +1,7 @@
+const main = {
+ var a = 42
+ var f = {b
+ -> a + b
+ }
+ -> f(13)
+}