def read_channel
bendvy-ecs-core@0.1.0.3 · execution_lifecycle_notices.bend:156
import bendvy-ecs-core@0.1.0.3/execution_lifecycle_notices.bend as ExecutionLifecycleNotices
import Base
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
156def read_channel(~S:Data,~origin:Layout.Layout,~selector:Selector,namespace:U32,id:U32,+cursor:Nat,channel:Channel<S>) -> Reading<S,origin,selector>:
157 match channel:
158 case Channel{_,_,previous,current,+floor}:yielded(~S,~origin,~selector,namespace,id,Nat.max(cursor,floor),Nat.sub(floor,cursor),first_after_generic(S,Nat.max(cursor,floor),List.append(&2,Row<S>,previous,current)))