From 661156ce988131eb4896a7af4d00a42b520305e7 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 17 May 2026 11:53:35 -0700 Subject: This is REAL Artificial Intelligence and definitely REALLY COMPLICATED --- util.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'util.lua') diff --git a/util.lua b/util.lua index 8f1de2a..6aae259 100644 --- a/util.lua +++ b/util.lua @@ -47,6 +47,15 @@ function qsort(a, c, l, r) return a end +function some(a, pred) + for k, v in pairs(a) do + if pred(v) then + return true + end + end + return false +end + function filter(a, pred) filtered = {} for k, v in pairs(a) do -- cgit v1.3