def first_values_loop

bendvy-ecs-core@0.1.0.4 · event_publication.bend:40

import bendvy-ecs-core@0.1.0.4/event_publication.bend as EventPublication
import Base

40def first_values_loop(~A:Data,~B:Data,items:List<&2,Publication<A,B>>,reversed:List<&2,A>) -> List<&2,A>:
41  match items:
42    case []:List.reverse(&2,A,reversed)
43    case Publication{first,_} <> rest:first_values_loop(~A,~B,rest,prepend_values(~A,first,reversed))

Uses (4)

Used by (1)