package forester

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file Option_util.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
(*
 * SPDX-FileCopyrightText: 2024 The Forester Project Contributors
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *)

let override x y =
  match x with
  | Some _ -> x
  | None -> y

let guard p x =
  if p x then Some x else None
OCaml

Innovation. Community. Security.