package containers
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
A modular, clean and powerful extension of the OCaml standard library
Install
dune-project
Dependency
Authors
Maintainers
Sources
containers-3.17.tbz
sha256=0f70824867269c02bf01ae12206aa47a6f669d69f1954c19e68ece9f444f1cba
sha512=11de2d7b7173659e6b83c487ac116a93d4b780b86da07386e7604f8fd45f6841e93cba59dba59ed7dbf6e1bc26561202ae1d2e7238a12f588dfd557d4f2da589
doc/src/containers/CCEqual.ml.html
Source file CCEqual.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(* This file is free software, part of containers. See file "license" for more details. *) (** {1 Equality Combinators} *) type 'a t = 'a -> 'a -> bool let poly = Stdlib.( = ) let physical = Stdlib.( == ) let int : int t = ( = ) let string : string t = Stdlib.( = ) let bool : bool t = Stdlib.( = ) let float : float t = Stdlib.( = ) let unit () () = true let rec list f l1 l2 = match l1, l2 with | [], [] -> true | [], _ | _, [] -> false | x1 :: l1', x2 :: l2' -> f x1 x2 && list f l1' l2' let array eq a b = let rec aux i = if i = Array.length a then true else eq a.(i) b.(i) && aux (i + 1) in Array.length a = Array.length b && aux 0 let option f o1 o2 = match o1, o2 with | None, None -> true | Some _, None | None, Some _ -> false | Some x, Some y -> f x y let pair f g (x1, y1) (x2, y2) = f x1 x2 && g y1 y2 let triple f g h (x1, y1, z1) (x2, y2, z2) = f x1 x2 && g y1 y2 && h z1 z2 let map f eq x y = eq (f x) (f y) let always_eq _ _ = true let never_eq _ _ = false module Infix = struct let ( >|= ) x f = map f x end include Infix
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>