def loop

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

import ezx@1.11.0.0/src/lock/run.bend as Run
import Base
import ezx@1.11.0.0/src/lock/world.bend as W
import ezx@1.11.0.0/src/ws/up.bend as WsUp

695# the loop, under fuel. Every round adds at least one answer, since the
696# planner never asks what the World answers already.
697def loop(fuel: Nat, +lib: String, +back: WsUp.Back, +world: W.World) -> IO(Unit):
698  match fuel:
699    case 0n:
700      IO.die(Unit, 1, "ez: the lock kept asking questions")
701    case 1n+f:
702      loop.step(WsUp.step(back, world), lib, back, world, w => loop(f, lib, back, w))

Uses (9)

Used by (1)