TensorWindow.leading: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_window.bend as TensorWindow Lines 26-29 of stelliferous@0.0.2.0/tensor_window.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_window.bend&start_line=26&end_line=29 import Base import stelliferous@0.0.2.0/tensor_shape.bend as Shapes def leading(ranked: Bool,+shape: List<&2,U32>) -> Maybe<&2,U32>: match ranked: case True{}: Shapes.product(List.take(&2,U32,shape,Nat.sub(List.length(&2,U32,shape),2n)),Some{1}) case False{}: None{} 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=List.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.take https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_shape.bend&name=product