TensorCursor.carry: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_cursor.bend as TensorCursor Lines 38-44 of stelliferous@0.0.2.0/tensor_cursor.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_cursor.bend&start_line=38&end_line=44 import Base def carry(axes: List<&2,Axis>,address: U32,reset: List<&2,Axis>) -> List<&2,Axis> & U32: match axes: case []: (restore(reset,[]),address) case Axis{extent,0n,stride,rewind} <> tail: (restore(reset,Axis{extent,0n,stride,rewind} <> tail),address) case Axis{+extent,1n,stride,+rewind} <> tail: carry(tail,(address - rewind : U32),Axis{extent,extent,stride,rewind} <> reset) case Axis{extent,1n+1n+remaining,+stride,rewind} <> tail: (restore(reset,Axis{extent,1n+remaining,stride,rewind} <> tail),(address + stride : U32)) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_cursor.bend&name=Axis https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_cursor.bend&name=restore