# NOT RUN {
## reflect function is currently defined as
function(x,...) ifelse(x>0, f(x,...), f(-x,...))/2
## fold function is currently defined as
function(x,...) ifelse(x>=0, f(x,...)+f(-x,...), 0)
## double exponential pdf
ddexp=reflect(dexp)
## folded normal pdf
dfnorm=fold(dnorm)
# }
Run the code above in your browser using DataLab