package ocaml-solo5
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
OCaml cross-compiler to the freestanding Solo5 backend
Install
dune-project
Dependency
Authors
Maintainers
Sources
v1.3.3.tar.gz
md5=47876167068345542f49279e8fd28896
sha512=272081ec51a6ed69c08e4e8fa64fee3df53fd84c66c0c07a653891c88b342cf74553e1c95711e4fbc18922c899a3448a649f3bd9858f8d89cae834ad2b67fffb
doc/src/stdlib/option.ml.html
Source file option.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67(**************************************************************************) (* *) (* OCaml *) (* *) (* The OCaml programmers *) (* *) (* Copyright 2018 Institut National de Recherche en Informatique et *) (* en Automatique. *) (* *) (* All rights reserved. This file is distributed under the terms of *) (* the GNU Lesser General Public License version 2.1, with the *) (* special exception on linking described in the file LICENSE. *) (* *) (**************************************************************************) type 'a t = 'a option = None | Some of 'a let none = None let some v = Some v let value o ~default = match o with Some v -> v | None -> default let get = function Some v -> v | None -> invalid_arg "option is None" let bind o f = match o with None -> None | Some v -> f v let join = function Some o -> o | None -> None let map f o = match o with None -> None | Some v -> Some (f v) let product o0 o1 = match o0, o1 with | None, _ | _, None -> None | Some v0, Some v1 -> Some (v0, v1) let fold ~none ~some = function Some v -> some v | None -> none let iter f = function Some v -> f v | None -> () let is_none = function None -> true | Some _ -> false let is_some = function None -> false | Some _ -> true let blend f o1 o2 = match o1, o2 with | None, None -> None | (Some _ as x), None | None, (Some _ as x) -> x | Some v1, Some v2 -> Some (f v1 v2) let equal eq o0 o1 = match o0, o1 with | Some v0, Some v1 -> eq v0 v1 | None, None -> true | _ -> false let compare cmp o0 o1 = match o0, o1 with | Some v0, Some v1 -> cmp v0 v1 | None, None -> 0 | None, Some _ -> -1 | Some _, None -> 1 let for_all p = function | None -> true | Some v -> p v let exists p = function | None -> false | Some v -> p v let to_result ~none = function None -> Error none | Some v -> Ok v let to_list = function None -> [] | Some v -> [v] let to_seq = function None -> Seq.empty | Some v -> Seq.return v module Syntax = struct let ( let* ) = bind let ( and* ) = product let ( let+ ) o f = map f o let ( and+ ) = product end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>