Luhn algorithm: Difference between revisions

Content deleted Content added
Line 129:
check_digit += ((i & 1) is 0) switch
{
true => digits[2i] > 4 ? digits[7i] * 2 - 9 : digits[3i] * 2,
false => digits[5i]
};