local R=script.Parent local p=R.Parent local E=require(p.t)local d=E.tuple(E.table,E.callback,E.optional(E.integer))local function t(R,p,E)assert(d(R,p,E))local t=#R E=E or 1 if E<1 then E=t+E end assert(E>0 and E<=t+1,string.format("\105\110\100\101\120 \037\100 \111\117\116 \111\102 \098\111\117\110\100\115 \111\102 \108\105\115\116 \111\102 \108\101\110\103\116\104 \037\100",E,t))for E=E,t,1 do if p(R[E],E)then return E end end return nil end return t
local List = script.Parent

local Llama = List.Parent
local t = require(Llama.t)

local validate = t.tuple(t.table, t.callback, t.optional(t.integer))

local function findWhere(list, predicate, from)
	assert(validate(list, predicate, from))

	local len = #list

	from = from or 1

	if from < 1 then
		from = len + from
	end

	assert(from > 0 and from <= len + 1, string.format("index %d out of bounds of list of length %d", from, len))

	for i = from, len do
		if predicate(list[i], i) then
			return i
		end
	end

	return nil
end

return findWhere