MlbendDatasets.class_or_number: def of mlbend-datasets@0.1.6.0 Import: import mlbend-datasets@0.1.6.0/main.bend as MlbendDatasets Lines 131-141 of mlbend-datasets@0.1.6.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-datasets@0.1.6.0/main.bend&start_line=131&end_line=141 import Base # The label of a row: a class name is its class, a number is itself. def class_or_number(+text: String) -> F32: match text: case "Iris-setosa": class_of(text) case "Iris-versicolor": class_of(text) case "Iris-virginica": class_of(text) case _: number_or_zero(F32.read(text)) 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=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.read https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Nil https://jend.leeeet.dev/definition.txt?path=mlbend-datasets@0.1.6.0/main.bend&name=class_of https://jend.leeeet.dev/definition.txt?path=mlbend-datasets@0.1.6.0/main.bend&name=number_or_zero