MlbendSplit.split_of: def of mlbend-split@0.1.1.0 Import: import mlbend-split@0.1.1.0/main.bend as MlbendSplit Lines 160-166 of mlbend-split@0.1.1.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-split@0.1.1.0/main.bend&start_line=160&end_line=166 import Base # The rows of one fold: the ones that test and the ones that train. def split_of(fs: List<&2, Nat>, +f: Nat, +i: Nat, +test: List<&2, Nat>, +train: List<&2, Nat>) -> Split: match fs: case Nil{}: Split{train, test} case Con{+h, t}: split_of(t, f, Nat.add(i, 1n), test_row(h, f, test, i), train_row(h, f, train, i)) 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=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=mlbend-split@0.1.1.0/main.bend&name=Split https://jend.leeeet.dev/definition.txt?path=mlbend-split@0.1.1.0/main.bend&name=test_row https://jend.leeeet.dev/definition.txt?path=mlbend-split@0.1.1.0/main.bend&name=train_row