module Language.Drasil.Misc (mkTable, repUnd) where
mkTable :: [a -> b] -> [a] -> [[b]]
mkTable :: forall a b. [a -> b] -> [a] -> [[b]]
mkTable [a -> b]
fs = (a -> [b]) -> [a] -> [[b]]
forall a b. (a -> b) -> [a] -> [b]
map (\a
x -> ((a -> b) -> b) -> [a -> b] -> [b]
forall a b. (a -> b) -> [a] -> [b]
map ((a -> b) -> a -> b
forall a b. (a -> b) -> a -> b
$ a
x) [a -> b]
fs)
repUnd :: String -> String
repUnd :: String -> String
repUnd = (Char -> Char) -> String -> String
forall a b. (a -> b) -> [a] -> [b]
map Char -> Char
rep
where
rep :: Char -> Char
rep :: Char -> Char
rep Char
'_' = Char
'.'
rep Char
c = Char
c