From f1981e85db8cc349dc1e4cfa4cddb6e83ae2ad17 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 5 Jun 2023 22:23:25 -0700 Subject: [PATCH] document a couple of miscellaneous helpers --- reference.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reference.md b/reference.md index 3426d25..802c99d 100644 --- a/reference.md +++ b/reference.md @@ -317,6 +317,12 @@ and [the Lua manual](https://www.lua.org/manual/5.1/manual.html#5.7). * `App.setClipboardText(text)` -- stores the string `text` in the clipboard. (Based on [LÖVE](https://love2d.org/wiki/love.system.setClipboardText).) +* `array.find(arr, elem)` -- scan table `arr` for `elem` assuming it's + organized as an array (just numeric indices). + +* `array.any(arr, f)` -- scan table `arr` for any elements satisfying + predicate `f`. Return first such element or `false` if none. + There's much more I could include here; check out [the LÖVE manual](https://love2d.org/wiki) and [the Lua manual](https://www.lua.org/manual/5.1/manual.html).