summaryrefslogtreecommitdiff
path: root/examples/nq/closures.sin
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nq/closures.sin')
-rw-r--r--examples/nq/closures.sin4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/nq/closures.sin b/examples/nq/closures.sin
index 2e23daf..36d5427 100644
--- a/examples/nq/closures.sin
+++ b/examples/nq/closures.sin
@@ -16,10 +16,12 @@
[dec tail [xs]]
[dec is_nil [xs]]
+[dec inc [x]]
+
[def add_arg [c a]
[closure_ [closure_.func c]
[closure_.arity c]
- [+ [closure_.arg_c c] 1]
+ [inc [closure_.arg_c c]]
[append [closure_.args c] a]]]
[def run_closure [h]