def age_of

cswap-bend-cli@0.1.0.0 · tui/read.bend:78

import cswap-bend-cli@0.1.0.0/tui/read.bend as Read
import Base
import cswap-bend-cli@0.1.0.0/tui/num.bend as N

78def age_of(+fetched: Maybe<&2, U32>, +now: U32) -> Maybe<&2, U32>:
79  match fetched:
80    case None{}:
81      None{}
82    case Some{t}:
83      Some{N.sel(U32.is_gt(now, t), (now - t : U32), 0)}

Uses (5)

Used by (1)