Concatenate two formatters.
formatter1 % formatter2 is a formatter that accepts arguments
for
formatter1 and
formatter2 and concatenates their
results. For example
format1 :: Format r (Text -> r)
format1 = "Person's name is " % text
format2 :: Format r r
format2 = ", "
format3 :: Format r (Int -> r)
format3 = "age is " % hex
myFormat :: Format r (Text -> Int -> r)
myFormat = format1 % format2 % format3
Notice how the argument types of
format1 and
format3
are gathered into the type of
myFormat.
(This is actually the composition operator for
Formats
Category instance, but that is (at present) inconvenient to use
with regular
Prelude. So this function is provided as a
convenience.)