def found.put

ezx@1.11.0.0 · src/lock/run.bend:395

import ezx@1.11.0.0/src/lock/run.bend as Run
import Base
import ezx@1.11.0.0/src/lock/up.bend as Up

395# one source in front of the rest, or the first that could not be read
396def found.put(got: Maybe<&2, String>, +at: String, rest: Up.Answer) -> Up.Answer:
397  match got:
398    case None{}:
399      Up.Miss{"ez: " ++ at ++ " could not be read"}
400    case Some{text}:
401      match rest:
402        case Up.Files{fs}:
403          Up.Files{Up.Found{at, text} <> fs}
404        case _:
405          rest

Uses (6)

Used by (1)