ISN.ISBNInternational Standard Book Numbers (ISBNs)
val string_of_flavor : flavor -> stringstring_of_flavor converts a flavor value to a string.
The type of parsed ISBNs.
val bn : t -> string(bn t) is the book number (exclusive of check digit) of the parsed ISBN t.
val cd : t -> char(cd t) is the check digit of the parsed ISBN t.
val to_string : t -> stringto_string converts a parsed ISBN to a string representation.
val dump : t -> stringdump converts a parsed ISBN to a string suitable for debugging and testing.
norm is Prelude.ISN.norm.
val parse : string -> t(check910 bn) computes the check digit from the book number part of a 9- or 10-digit ISBN.
The "book number" is the ISBN with the check digit removed. You can acquire a book number from an ISBN via (parse >> bn).
(check13 bn) computes the check digit from the book number part of a 13-digit ISBN.
The "book number" is the ISBN with the check digit removed. You can acquire a book number from an ISBN via (parse >> bn).
val compute : t -> char(compute t) computes the check digit from a parsed ISBN.
Invariant: ∀t . (valid t) && (compute t = cd t).
val valid : t -> bool(valid t) returns true if the parsed ISBN has a valid check digit and false otherwise.
(set t) computes and sets the check digit for the book number in t.
(set t) works whether or not (valid t).
Invariant: ∀t . (valid t) && (t = (set t))