def adopt.newer

cswap-bend-cli@0.1.0.0 · urec.bend:161

import cswap-bend-cli@0.1.0.0/urec.bend as Urec
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/ustore.bend as Ustore

161def adopt.newer(replace: Bool, +usage: Json.Json, +at: U32, stored: Maybe<&2, U32>, hold: Maybe<&2, U32>, +now: U32, +row: Json.Json) -> Ustore.RAd:
162  match replace:
163    case True{}:
164      Ustore.RAd{adopt.hold(hold, at, now, Json.set("fetchedAt", Ustore.fl(at), Json.set("lastGood", usage, row))), True{}}
165    case False{}:
166      Ustore.RAd{adopt.hold(hold, Maybe.default(&2, U32, stored, at), now, row), False{}}

Uses (9)

Used by (1)