def count_nonempty
import stelliferous@0.0.2.0/tensor_shape.bend as TensorShapeimport Base
42def count_nonempty(empty: Bool,extents: List<&2,U32>) -> Maybe<&2,U32>:
43 match empty:
44 case True{}: Some{0}
45 case False{}: product(extents,Some{1})