Source file with_valid.ml

1
2
3
4
5
6
7
8
9
open! Import

type 'a t =
  { valid : 'a
  ; value : 'a
  }
[@@deriving sexp_of]

let map x ~f = { valid = f x.valid; value = f x.value }