aboutsummaryrefslogtreecommitdiff
path: root/challenge-080/stuart-little/lua/ch-1.lua
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-080/stuart-little/lua/ch-1.lua')
-rwxr-xr-xchallenge-080/stuart-little/lua/ch-1.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/challenge-080/stuart-little/lua/ch-1.lua b/challenge-080/stuart-little/lua/ch-1.lua
new file mode 100755
index 0000000000..e9c958da72
--- /dev/null
+++ b/challenge-080/stuart-little/lua/ch-1.lua
@@ -0,0 +1,9 @@
+#!/usr/bin/env lua
+
+-- run <script> <space-separated numbers>
+
+local out = 1
+for _,v in ipairs(arg) do
+ if tonumber(v) == out then out=out+1 end
+end
+print(out)