An old-style formatting function taken from text-format (see
Data.Text.Format). Unlike Data.Text.Format.format from
Data.Text.Format, it can produce String and strict Text as well (and
print to console too). Also it's polyvariadic:
format "{} + {} = {}" 2 2 42 + 2 = 4
You can use arbitrary formatters:
format "0x{} + 0x{} = 0x{}" (hexF 130) (hexF 270) (hexF (130+270))0x82 + 0x10e = 0x190