package exenum
Build efficient enumerations for datatypes. Inspired by Feat for Haskell.
Install
Dune Dependency
Authors
Maintainers
Sources
v0.84.0.tar.gz
sha256=d1d0f10e592895ecce69fe31cacd7572077dff4f960a6f16d223f56274be4a8f
md5=f4d7c0bf20a74918f68919ff28739b4f
doc/src/exenum.internals/convenience.ml.html
Source file convenience.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
(******************* Convenience functions **********************) let myfold l a f = List.fold_left f a l let myrevmap l f = List.rev_map f l let myrevmap2 l1 l2 f = List.rev_map2 f l1 l2 (* Builds a string from a list of items *) let sep map sp l = List.fold_left (fun acu x -> if acu = "" then map x else acu ^ sp ^ (map x)) "" l (******************* Shortcuts to Zarith ***********************) let (++) = Z.add let (+++) b i = b ++ (Z.of_int i) let succ = Z.succ let (--) = Z.sub let minus = Z.neg let ( *^ ) i j = let open Z in (Z.of_int i) ** j let ( ** ) = Z.mul let ( **. ) i b = (Z.of_int i) ** b let quomod = Z.div_rem let bigmod a b = Z.rem a b let sign = Z.sign let big_compare = Z.compare let bigzero = Z.zero let bigone = Z.one let is_bigone x = Z.compare x bigone = 0 let sob = Z.to_string let bos = Z.of_string let boi = Z.of_int let iob = Z.to_int
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>