Generic.imid: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/math/generic.bend as Generic Lines 379-381 of bend-collections@1.0.0.0/src/math/generic.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/math/generic.bend&start_line=379&end_line=381 import Base import bend-collections@1.0.0.0/src/math/num.bend as N # lo + (hi - lo) / 2, never above hi def imid(~T: Data, ~op: N.Op -> T, +lo: T, +hi: T) -> T: op(N.Add{lo, op(N.Half{op(N.Sub{hi, lo})})}) Uses (1): https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/num.bend&name=Op