Skip to content

Instantly share code, notes, and snippets.

@jbrains
Created July 2, 2017 16:22
Show Gist options
  • Save jbrains/3a50b62382a7769f29c5854112190595 to your computer and use it in GitHub Desktop.
Save jbrains/3a50b62382a7769f29c5854112190595 to your computer and use it in GitHub Desktop.
Example: the value of describing a function with a comment
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)
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