Damm algorithm: Difference between revisions

m
m (→‎static table: changed a word in the REXX section header.)
Line 627:
112949 is invalid</pre>
=={{header|Haskell}}==
<lang haskell>import Data.Char (orddigitToInt)
import Text.Printf (printf)
 
damm :: String -> Bool
damm = (==0) . foldl (\r n -> (table !! r !!) (ord. n - ord '0')digitToInt) 0
where
table =
Anonymous user