Type-safe string templating
List (Component a)
A list of the components of a template
template : String -> Template record
Create an initial template starting with the given string
template "my string "
withValue : (record -> String) -> Template record -> Template record
Attach a record accessor to a template
template "my string "
|> withValue .hello
withString : String -> Template record -> Template record
Attach a string to a template
template "my string "
|> withValue .hello
|> withString " another string"
render : record -> Template record -> String
Walks through a template's components and renders them to a single string
template "my string "
|> withValue .hello
|> withString " another string"
|> render { hello = "world" }