The Luhn algorithm is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers and Canadian Social Insurance Numbers.
This code was made based on Exercism exercise.
The Luhn Algorithm on Wikipedia http://en.wikipedia.org/wiki/Luhn_algorithm