def combine

mylsm-lsm-store@0.6.0.1 · src/scan/CursorCleanupPolicy.bend:3

import mylsm-lsm-store@0.6.0.1/src/scan/CursorCleanupPolicy.bend as CursorCleanupPolicy
import Base

3# Preserves the first cleanup failure and otherwise returns the final result.
4def combine(
5  a,
6  -E: Kind(a),
7  first: Result<a, &1, E, Unit>,
8  second: Result<a, &1, E, Unit>
9) -> Result<a, &1, E, Unit>:
10  match first:
11    case Fail{error}: Fail{error}
12    case Done{Unit{}}: second

Uses (2)

Used by (1)