f_operator = function(f){
new_f = function(x){
if(x>0){
f(x)
}else{
cnd = catch_cnd(rlang::abort(
message = "invalid input",
.subclass = "invalid_input",
invalid_input = x))
}
}
return(new_f)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.