Created
July 2, 2017 16:22
-
-
Save jbrains/3a50b62382a7769f29c5854112190595 to your computer and use it in GitHub Desktop.
Example: the value of describing a function with a comment
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
divFor : (a -> List (Attribute msg)) -> (a -> List (Html msg)) -> a -> Html msg | |
divFor cssStylesFor bodyFor blob = | |
-- Given functions that generate attributes and HTML elements for a thing, | |
-- wrap it in a div. | |
div | |
(cssStylesFor blob) | |
(bodyFor blob) |
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
divFor : (a -> List (Attribute msg)) -> (a -> List (Html msg)) -> a -> Html msg | |
divFor attributesFor bodyElementsFor blob = | |
-- Given functions that generate attributes and HTML elements for a thing, | |
-- wrap it in a div. | |
div | |
(attributesFor blob) | |
(bodyElementsFor blob) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment