Add break builtin for foreach

This commit is contained in:
Nicolas Williams committed 2014-07-07 19:33:17 -05:00
1 parent 6458910ba3
commit 539dccae90
4 files changed
+7 -4

No files matched your search

+1 -1
View File
@@ -226,7 +226,7 @@ null
1
[1,2,4,8,16,32,64]
[foreach .[] as $item ([3, null]; if .[0] < 1 then empty else [.[0] -1, $item] end; .[1])]
[foreach .[] as $item ([3, null]; if .[0] < 1 then break else [.[0] -1, $item] end; .[1])]
[11,22,33,44,55,66,77,88,99]
[11,22,33]