def Int.checked

bend-kit-int@0.2.0.0 · int.bend:209

import bend-kit-int@0.2.0.0/int.bend as Int
import Base

209def Int.checked(-n: Nat, o: Bool & Word(n)) -> Maybe<&2, Word(n)>:
210  (ov, r) = o
211  match ov:
212    case True{}:
213      None{}
214    case False{}:
215      Some{r}

Uses (6)

Used by (9)