def jpeg.components.units
import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpegimport Base
207def jpeg.components.units(xs: List<&2, JPEGComponent>) -> U32:
208 match xs:
209 case Nil{}: 0
210 case Con{JPEGComponent{_, h, v, _, _, _, _, _, _, _, _}, rest}: (h * v + jpeg.components.units(rest) : U32)