-- This module provides a generic exponential search algorithm.requirestrict
local checkType = require('libraryUtil').checkTypelocal floor = math.floor
local function midPoint(lower, upper) return floor(lower + (upper - lower) / 2)end
local function search(testFunc, i, lower, upper) if testFunc(i) then if i + 1
return function (testFunc, init) checkType('Exponential search', 1, testFunc, 'function') checkType('Exponential search', 2, init, 'number', true) if init and (init < 1 or init ~= floor(init) or init