Skip to content

Carlsson87/mod10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Modulus 10

The Modulus 10 algorithm is used to detect accidental input errors in digit sequences such as credit card numbers and bank account numbers.

Check out the wikipedia article for more info.

Usage

import Mod10

checkDigit : Result Mod10.Error Int
checkDigit =
    Mod10.calculateCheckDigit [1, 2, 3]

isValid : Result Mod10.Error Bool
isValid =
    Mod10.hasValidCheckDigit [1, 2, 3, 0]

About

Modulus 10 algorithm in Elm

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages