package exenum
Build efficient enumerations for datatypes. Inspired by Feat for Haskell.
Install
Dune Dependency
Authors
Maintainers
Sources
v0.82.0.tar.gz
sha256=ab25cd106937fefef265abc6e7157a1d48c5ea6663fab7d782914d9659ff4aee
md5=5367c3fe8d5a3b645c719b48889a6fce
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 43
(******************* 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 BIG INT ***********************) open Big_int let (++) = add_big_int let (+++) = add_int_big_int let succ = succ_big_int let (--) = sub_big_int let minus = minus_big_int let ( ** ) = mult_big_int let ( **. ) = mult_int_big_int let quomod = quomod_big_int let bigmod = mod_big_int let ( *^ ) = power_int_positive_int let sign = sign_big_int let (<==) = le_big_int let big_compare = compare_big_int let bigzero = zero_big_int let bigone = unit_big_int let is_bigone x = big_compare x bigone = 0 let sob = string_of_big_int let bos = big_int_of_string let boi = big_int_of_int let iob = int_of_big_int
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>