def list.mul

bend-ml-llama@0.2.1.0 · main.bend:295

import bend-ml-llama@0.2.1.0/main.bend as BendMlLlama
import Base

295# xs * ys, element by element (to the shorter length)
296def list.mul(xs: List<&2, F32>, ys: List<&2, F32>) -> List<&2, F32>:
297  match xs ys:
298    case Con{+h, t} Con{+g, u}:
299      (h * g : F32) <> list.mul(t, u)
300    case _ _:
301      Nil{}

Uses (3)

Used by (1)