checksum-0.0.0.1: Compute and verify checksums of ISBN, IBAN, etc.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Math.Checksum.ISBN

Description

International Standard Book Number

https://en.wikipedia.org/wiki/International_Standard_Book_Number

Covers only ISBN-10. For ISBN-13 simply use Math.Checksum.EAN.

Synopsis

Documentation

checksum :: String -> Exceptional String Int Source #

checksum "346811124" == Success 10

valid :: String -> Maybe String Source #

valid "346811124X" == Nothing
valid "3468111240" == Just "check sum does not match"