Map.OrderedType(3)

πŸ’– NAME πŸ’–

okay so bestie, Map.OrderedType(3) is from the OCaml library, and it is literally the input signature of the functor Map.Make. That’s the whole vibe. 🫢


🧚 MODULE TYPE 🧚

Module type Map.OrderedType

Module type OrderedType
 = sig end

✨ DOCUMENTATION ✨

Input signature of the functor Map.Make. periodt. πŸ’…

  • type t β€” the type of the map keys. lowkey the main character type here. πŸ‘‘
  • val compare : t -> t -> int β€” a total ordering function over the keys, no cap. This is a two-argument function f such that:
    • f e1 e2 is zero if the keys e1 and e2 are equal
    • f e1 e2 is strictly negative if e1 is smaller than e2
    • f e1 e2 is strictly positive if e1 is greater than e2

Example: a suitable ordering function is the generic structural comparison function compare. slay. 🌟


source/version: OCamldoc Β· date: 2026-06-22 Β· page: Map.OrderedType(3) πŸ«ΆπŸ’–

πŸ“¦ where this page comes from