def fuel
import ezx@1.11.0.0/src/pub/plan.bend as Planimport Base
import ezx@1.11.0.0/src/pkg/pkg.bend as K
423# the walk's fuel: one step for the entry and one per line of the files it
424# was given, since every import it can queue is a line of one of them
425def fuel(fs: List<&2, K.Source>) -> Nat:
426 match fs:
427 case []:
428 1n
429 case K.Source{_at, text} <> t:
430 (List.length(&2, String, String.lines(text)) + fuel(t) : Nat)