message: perf: extract loop from mapAccum
diff: @@ -164,25 +164,28 @@ function function_<A, B>(
  export { function_ as function }
  -/**
  - * Reduces a state S using f while mapping the output
  - */
  -export function mapAccum<S, A, B>(
  +function mapAccumGo<S, A, B>(
  s: S,
  f: (s: S, a: A) => readonly [S, B]
  ): Pipeline<unknown, never, A, B, S> {
  - function go(s: S): Pipeline<unknown, never, A, B, S> {
  return Channel.chain_(
  awaitOption<A>(),
  O.fold(
  () => Channel.succeed(s),
  (a) => {
  const [s1, b] = f(s, a)
  - return Channel.chain_(Channel.write(b), () => go(s1))
  + return Channel.chain_(Channel.write(b), () => mapAccumGo(s1, f))
  }
  )
  )
  }
  - return go(s)
  +/**
  + * Reduces a state S using f while mapping the output
  + */
  +export function mapAccum<S, A, B>(
  + s: S,
  + f: (s: S, a: A) => readonly [S, B]
  +): Pipeline<unknown, never, A, B, S> {
  + return mapAccumGo(s, f)
  }
  