def head_or_zero
import mlbend-generative@0.1.1.0/main.bend as MlbendGenerativeimport Base
376# the head of a list, or 0.0 when it is empty: the missing eps or z of a
377# step whose z is not drawn at all (eta = 0 passes Nil, and sigma·0.0 is
378# 0.0)
379def head_or_zero(xs: List<&2, F32>) -> F32:
380 match xs:
381 case Nil{}:
382 0.0
383 case Con{h, t}:
384 h