CamlinternalMenhirLib.General(3)

💖 NAME 💖

CamlinternalMenhirLib.General — bestie, the description is literally no description. That’s it. That’s the whole name section. This little page lives in the OCaml library manual and is giving mysterious side-character energy, but we’re gonna read it anyway because we’re thorough like that 💅


🧚 Module 🧚

Module CamlinternalMenhirLib.General


✨ Documentation ✨

🌸 Module General

: sig end

Okay so here’s the whole lineup, bestie — every value and type, exactly as it appears, no cap:

  • val take : int -> 'a list -> 'a list — takes an int and an 'a list, hands you back an 'a list. Classic little list goblin behavior 🍓
  • val drop : int -> 'a list -> 'a list — same shape: int plus 'a list in, 'a list out. It’s the sibling of take, living its own life ✨
  • val uniq : ('a -> 'a -> int) -> 'a list -> 'a list — you bring a comparison function ('a -> 'a -> int) and an 'a list, and you get an 'a list back. Very “trust me with your comparator” of it 🎀
  • val weed : ('a -> 'a -> int) -> 'a list -> 'a list — same vibe as uniq: comparison function ('a -> 'a -> int) in, 'a list out, 'a list returned. It’s giving list-maintenance fairy 🧚

Then the types:

type 'a stream = 'a head Lazy.t

So an 'a stream is literally a 'a head Lazy.t — lazy girlies, we love to see it 💜

type 'a head =
 | Nil
 | Cons of 'a * 'a stream

A 'a head is either Nil or Cons of 'a * 'a stream. Very choose-your-own-adventure, very iconic 👑

And the rest of the values:

  • val length : 'a stream -> int — takes an 'a stream, gives you an int. Slay ✨
  • val foldr : ('a -> 'b -> 'b) -> 'a stream -> 'b -> 'b — takes a function ('a -> 'b -> 'b), then an 'a stream, then a 'b, and returns a 'b. Fold-right bestie behavior fr fr 🫶
No extra lore, no hidden options, no environment variables, no exit statuses, no bugs, no author or copyright drama on this page — just the module, the signatures, and the vibe check 🌈

Sign-off time, bestie: this page was brought to you by OCamldoc, dated 2026-06-22, for CamlinternalMenhirLib.General(3). Periodt 💅💖

📦 where this page comes from