MoreLabels.Map.OrderedType(3)
β¨ NAME β¨
okay so welcome to MoreLabels.Map.OrderedType(3), straight out of the OCaml library manual, bestie. π«Ά This one is MoreLabels.Map.OrderedType β the input signature of the functor MoreLabels.Map.Make. that's the whole assignment. π
π Module type π
Module type MoreLabels.Map.OrderedType
π Documentation π
Module type OrderedType
= sig end
It's giving βinput signature of the functor MoreLabels.Map.Make.β literally that. no extra lore. πΈ
type tβ the type of the map keys. yes queen, this is the key type. πval compare : t -> t -> intβ a total ordering function over the keys. it's a two-argument functionfsuch that:f e1 e2is zero if the keyse1ande2are equalf e1 e2is strictly negative ife1is smaller thane2f e1 e2is strictly positive ife1is greater thane2
Example: a suitable ordering function is the generic structural comparison function compare. periodt, that's the example, and it ate. π₯
mwah π this iconic little page was served up by OCamldoc on 2026-06-22. don't forget to stan your ordering functions. π¦
π¦ where this page comes from
- arch rolling: ocaml 5.5.0-1 Β· LGPL2.1 AND custom: QPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms