def partition
bendvy-ecs-core@0.1.0.4 · machine_handler_bundle.bend:81
import bendvy-ecs-core@0.1.0.4/machine_handler_bundle.bend as MachineHandlerBundle
import Base
import world.bend as W
import system.bend as Sys
import machine_handlers.bend as H
81def partition(~S:Data,~K:Data,~V:Data,~Q:Data,~C:Type,~R:Type,~E:Data,~runner:W.World<S,C,R,E> -> H.Invocation<V> -> Sys.Outcome<W.World<S,C,R,E>,String,Unit>,~same:V -> V -> Bool,entries:List<&1,Scheduled<S,K,V,Q,C,R,E,runner>>,+from:V,+to:V) -> Partition<S,K,V,Q,C,R,E,runner>:
82 match entries:
83 case []: Partition{[],[],H.Owners{[],[],[]}}
84 case Scheduled{+selector,needs,entry} <> tail: placed(~S,~K,~V,~Q,~C,~R,~E,~runner,choose(~S,~K,~V,~same,selector,from,to),selector,needs,entry,partition(~S,~K,~V,~Q,~C,~R,~E,~runner,~same,tail,from,to))