def swap

bendvy-ecs-core@0.1.0.4 · recoverable_array_owner.bend:43

import bendvy-ecs-core@0.1.0.4/recoverable_array_owner.bend as RecoverableArrayOwner
import Base
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product
import bendvy-ecs-core@0.1.0.4/recoverable_array.bend as A
import bendvy-ecs-core@0.1.0.4/recovery_journal.bend as Journal

43def swap(~State:Type,~P:Type,~Rest:Type,~lens:Product.Lens<State,Array<P>,Rest>,~Recovery:Type,~ReleasedRest:Type,~release:Product.Lens<Recovery,List<A.Record<P>>,ReleasedRest>,state:State,journal:List<Journal.Action(~State,~Recovery)>,index:U32,replacement:P) -> Attempt<State,Recovery,P>:
44  taken(~State,~P,~Rest,~lens,~Recovery,~ReleasedRest,~release,journal,index,replacement,Product.get_field(~State,~Array<P>,~Rest,lens)(state))

Uses (9)

Used by (5)