Damm algorithm: Difference between revisions

Content added Content deleted
No edit summary
Line 416: Line 416:
=={{header|Arturo}}==
=={{header|Arturo}}==


<lang rebol>table: [
<lang rebol>; by @Krenium

table: [
[0 3 1 7 5 9 8 6 4 2]
[0 3 1 7 5 9 8 6 4 2]
[7 0 9 2 1 5 4 8 6 3]
[7 0 9 2 1 5 4 8 6 3]
Line 429: Line 431:
]
]


digits: $ => [map split & => [to :integer]]
digits: function [x][map split x => [to :integer]]
damm?: function [z][zero? fold digits z .seed: 0 => [get get table]]

damm?: $ => [zero? fold digits & .seed: 0 => [get get table]]


test: function [str][
test: function [str][