TensorOperations.combine_when_with: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_operations.bend as TensorOperations Lines 94-101 of stelliferous@0.0.2.0/tensor_operations.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_operations.bend&start_line=94&end_line=101 import Base import stelliferous@0.0.2.0/storage_buffer.bend as Storage import stelliferous@0.0.2.0/tensor_view.bend as Views def combine_when_with(~Element: Data,~kernel: @+count: Nat -> @+right_view: Views.View -> @+offset: U32 -> Storage.Buffer -> Storage.Buffer -> Storage.Buffer & Storage.Buffer, valid: Bool,count: Maybe<&2,U32>,right_view: Views.View,target: Views.View,left: Storage.Buffer,right: Storage.Buffer) -> Outcome<(Storage.Buffer & Storage.Buffer)>: match valid count: case True{} Some{count}: Views.View{axes,offset} = target Accepted{kernel(U32.to_nat(count),right_view,offset,left,right)} case valid count: Rejected{(left,right)} Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=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.to_nat https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_buffer.bend&name=Buffer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_operations.bend&name=Outcome https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=View