package oepub

  1. Overview
  2. Docs

Module representing a chapter. A chapter can be seen as a title with a content.

type 'a t

the type representing a chapter of content 'a.

val of_content : string -> 'a -> 'a t

of_content title content creates a new chapter with title and content.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

compare cmp lhs rhs compares lhs and rhs by their title with String.compare and by cmp if they have the same title.

val title : 'a t -> string

title chapter returns the title of chapter.

val content : 'a t -> 'a

content chapter returns the content of chapter.

OCaml

Innovation. Community. Security.