Jump to content

Mayan numerals: Difference between revisions

m
→‎{{header|Haskell}}: Dropped import of `join` from Control.Monad (using concat instead)
(→‎{{header|Haskell}}: Pruned out liftA2 import (used <$> ... <*> instead))
m (→‎{{header|Haskell}}: Dropped import of `join` from Control.Monad (using concat instead))
Line 605:
<lang haskell>import Data.List (intercalate, transpose)
import qualified Data.Map.Strict as M
import Control.Monad (join)
import Data.Maybe (maybe)
import Data.Bool (bool)
Line 624 ⟶ 623:
mayanDigit n
| 0 /= n =
replicate (rem n 5) mayaOne : joinconcat (replicate (quot n 5) [mayaFive])
| otherwise = [[mayaZero]]
 
Line 635 ⟶ 634:
(M.fromList
[ ( "style"
, joinconcat
[ "text-align:center;"
, "background-color:#F0EDDE;"
Line 709 ⟶ 708:
{{Out}}
Mayan 4005:
 
{| style="text-align:center;background-color:#F0EDDE;color:#605B4B;border:2px solid silver;"
|style="width:3em;"|━━
9,655

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.