Convert a function to use rainbow-writing functions: replacing cat with lolcat, etc. This is done by rewriting environments rather than rewriting code.

lolify(fun, which = "all")

unlolify(fun)

Arguments

fun

A function to modify

which

Character vector indicating which types of output generating functions to modify. Possible values are "cat", "message" and "print", indicating which functions to modify. Multiple values are OK (e.g, c("cat", "message"). The special value "all" changes all values and is the default.

Value

A function with the environment rewritten to use lolifed versions of output functions

Details

The function unlolify reverses the process.

Author

Rich FitzJohn