Anonymous user
Eban numbers: Difference between revisions
m
→{{header|Haskell}}: simplify
m (→{{header|Tailspin}}: syntax update) |
m (→{{header|Haskell}}: simplify) |
||
Line 657:
{{trans|Julia}}
<lang haskell>{-# LANGUAGE NumericUnderscores #-}
import Data.List (
import Text.Printf (printf)
import Data.List.Split (chunksOf)
Line 669:
z = b : map (\x -> if x >= 30 && x <= 66 then x `mod` 10 else x) [m, t, r3]
ebans
▲ where
▲ Just (c, e) -> (thousands x, thousands $ pred c) : go xs
thousands:: Int -> String
|