TensorLayout.lead: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_layout.bend as TensorLayout Lines 373-384 of stelliferous@0.0.2.0/tensor_layout.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&start_line=373&end_line=384 import Base import stelliferous@0.0.2.0/tensor.bend as Tensors def lead(~Element: Data,parts: Tensors.Parts) -> Tensors.Parts & (List<&2,U32> & Element): match parts: case Tensors.Single{tensor}: Tensors.with_metadata(~Element,~(Tensors.Parts & (List<&2,U32> & Element)),tensor,tensor => shape => fill => status => workers => +shape = shape +fill = fill (Tensors.Single{tensor},(shape,fill))) case Tensors.Cons{tensor,rest}: Tensors.with_metadata(~Element,~(Tensors.Parts & (List<&2,U32> & Element)),tensor,tensor => shape => fill => status => workers => +shape = shape +fill = fill (Tensors.Cons{tensor,rest},(shape,fill))) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=stelliferous@0.0.2.0/tensor.bend&name=Parts https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=with_metadata