def drained

bendvy-ecs-core@0.1.0.4 · restore_graph_runtime_state.bend:36

import bendvy-ecs-core@0.1.0.4/restore_graph_runtime_state.bend as RestoreGraphRuntimeState
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/world_resource_owner.bend as WR
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product
import bendvy-ecs-core@0.1.0.4/event_notice_runtime.bend as Mixed
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as Notice

36def drained(~S:Data,~C:Type,~User:Type,~Logs:Type,~Machines:Type,~P:Data,~F:Type,~Owners:Type,~Receipt:Type,~clear:F -> F,rest:WR.Rest<S,C,Product.Owner<Product.Owner<User,Logs>,Machines>,Notice.Notice<S,P>>,user:User,machines:Machines,metadata:Mixed.State<S,P,F,Owners> & Nat,result:Logs & Receipt) -> W.World<S,C,Product.Owner<Product.Owner<User,Logs>,Machines>,Notice.Notice<S,P>> & ((Mixed.State<S,P,F,Owners> & Nat) & Receipt):
37  match result:
38    case (logs,receipt):(W.events_replace(~S,~C,~Product.Owner<Product.Owner<User,Logs>,Machines>,~Notice.Notice<S,P>,WR.put(~S,~C,~Product.Owner<Product.Owner<User,Logs>,Machines>,~Notice.Notice<S,P>,rest,Product.Owner{Product.Owner{user,logs},machines}),[]),(clear_metadata(~S,~P,~F,~Owners,~clear,metadata),receipt))

Uses (12)

Used by (1)