def ar.cached
bend-kit-regex@0.8.0.0 · regex.bend:1935
import bend-kit-regex@0.8.0.0/regex.bend as Regex
import Base
1935
1936def ar.cached(fresh: Bool, +hit: U32, outs: List<&2, Op>, ar: Ar, +init: List<&2, Maybe<&2, U32>>, +pos: U32, +start: Maybe<&2, List<&2, Inst>>, +next: Maybe<&2, Char>) -> Ar:
1937 match fresh:
1938 case True{}:
1939 ar.cached.fresh(seed.skip(Nil{}, None{}, start, next), ar, outs, init, pos)
1940 case False{}:
1941 Ar{old, spare, size, +cap, best} = ar
1942 ar.replay.best(ar.best.none(U32.is_eq(hit, 0), old, hit, init, best), spare, outs, cap, init, pos)