Luhn test of credit card numbers: Difference between revisions

Added Uiua solution
(Added Uiua solution)
Line 6,615:
1234567812345678 -> bad
1234567812345670 -> good</pre>
 
=={{header|Uiua}}==
<syntaxhighlight lang="uiua">
Luhn ← =0◿10+⊃(/+⊢|/+∵(⍥(-9)>9.×2)⊡1)⍉⬚0↯∞_2⇌
T ← {"49927398716"
"49927398717"
"1234567812345678"
"1234567812345670"}
≡◇(Luhn ≡⋕) T
</syntaxhighlight>
{{out}}
<pre>
[1 0 0 1]
</pre>
 
=={{header|UNIX Shell}}==
171

edits