GpuFit.is_flat: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/gpu_fit.bend as GpuFit Lines 127-138 of bend-lint-rules@0.2.0.0/performance/gpu_fit.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/gpu_fit.bend&start_line=127&end_line=138 import Base # Whether the types of `todo` are numbers, or records of numbers. `fuel` bounds the steps, so a # recursive type, which never ends, is data. def is_flat(fuel: Nat, todo: Maybe<&2, List<&2, String>>, +slots: List<&2, Slot>) -> Bool: match fuel todo: case _ None{}: False{} case _ Some{Nil{}}: True{} case 0n _: False{} case 1n+f Some{Con{+t, rest}}: is_flat(f, is_flat.next(is_scalar(t), t, rest, slots), slots) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/gpu_fit.bend&name=Slot https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/gpu_fit.bend&name=is_flat.next https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/gpu_fit.bend&name=is_scalar