ISN.ISSN
International Standard Serial Numbers (ISSNs)
val sn : t -> string
(sn t)
is the serial number (exclusive of check digit) of the parsed ISSN t
.
val cd : t -> char
(cd t)
is the check digit of the parsed ISSN t
.
val to_string : t -> string
to_string
converts a parsed ISSN to a string representation.
val pretty : t -> string
pretty
converts a parsed ISSN to a pretty string representation (includes hyphen).
norm
is Prelude.ISN.norm
.
val parse : string -> t
val compute : t -> char
(compute t)
computes the check digit from a parsed ISSN.
Invariant: ∀t . (valid t) && (compute t = cd t)
.
val valid : t -> bool
(valid t)
returns true
if the parsed ISSN has a valid check digit and false
otherwise.
(set t)
computes and sets the check digit for the serial number in t
.
(set t)
works whether or not (valid t)
.
Invariant: ∀t . (valid t) && (t = (set t))