elm-pages-v3-beta/examples/blog-engine/app/View.elm
2023-02-02 11:07:57 -08:00

17 lines
279 B
Elm

module View exposing (View, map)
import Html exposing (Html)
type alias View msg =
{ title : String
, body : List (Html msg)
}
map : (msg1 -> msg2) -> View msg1 -> View msg2
map fn doc =
{ title = doc.title
, body = List.map (Html.map fn) doc.body
}