#' Standard numeric functions implemented by folding
#'
#' @param x A numeric vector.
#' @details
#'
#' Functions leveraging either fold right or fold left.
#'
#' @examples
#' library(functionalPlayground)
#'
#' x <- 1:10
#' recursive_add(x)
#' recursive_multiply(x)
#' recursive_max(x)
#' recursive_min(x)
#' @export
recursive_add <- foldr(add, 0)
#' @rdname recursive_add
#' @export
recursive_multiply <- foldl(multiply, 1)
#' @rdname recursive_add
#' @export
recursive_max <- foldr(max_scaler, -Inf)
#' @rdname recursive_add
#' @export
recursive_min <- foldl(min_scaler, Inf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.