Last active
July 5, 2018 18:17
-
-
Save kylecorbelli/495d0e023f19c2d7afea6d1f76b2b05f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Html where | |
import Control.Monad.Reader (Reader, ask, runReader) | |
import Data.List (intercalate) | |
import Prelude hiding (div) | |
type Html = String | |
type Email = String | |
div :: [Html] -> Html | |
div children = | |
"<div>" ++ combine children ++ "</div>" | |
h1 :: [Html] -> Html | |
h1 children = | |
"<h1>" ++ combine children ++ "</h1>" | |
p :: [Html] -> Html | |
p children = | |
"<p>" ++ combine children ++ "</p>" | |
combine :: [Html] -> Html | |
combine = intercalate "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment