This function is a hack to avoid a problem with discounting when the argument is a constant.
A state object.
The hack consists in replacing calls to
discount(x * rep(1, dplyr::n())) to
x is recycled to the correct length.
A modified state object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.