Mayan numerals: Difference between revisions
Content added Content deleted
(→{{header|Haskell}}: Pruned out liftA2 import (used <$> ... <*> instead)) |
|||
Line 605: | Line 605: | ||
<lang haskell>import Data.List (intercalate, transpose) |
<lang haskell>import Data.List (intercalate, transpose) |
||
import qualified Data.Map.Strict as M |
import qualified Data.Map.Strict as M |
||
import Control.Applicative (liftA2) |
|||
import Control.Monad (join) |
import Control.Monad (join) |
||
import Data.Maybe (maybe) |
import Data.Maybe (maybe) |
||
Line 631: | Line 630: | ||
mayanFramed = |
mayanFramed = |
||
("Mayan " ++) . |
("Mayan " ++) . |
||
((++) <$> show <*> |
|||
liftA2 |
|||
((":\n\n" ++) . |
|||
wikiTable |
|||
(M.fromList |
|||
[ ( "style" |
|||
, join |
|||
[ "text-align:center;" |
|||
, |
, "background-color:#F0EDDE;" |
||
, "color:#605B4B;" |
|||
, "border:2px solid silver;" |
|||
]) |
|||
, ("colwidth", "3em;") |
|||
]) . |
|||
⚫ | |||
, ("colwidth", "3em;") |
|||
]) . |
|||
⚫ | |||
mayaZero, mayaOne :: Char |
mayaZero, mayaOne :: Char |