R/util.R

#' Partially apply a function.
#' @param f The function
#' @param ... Arguments to the function
curry <- function(f, ...) {
  curried.args <- list(...)
  function(...) do.call(f, append(curried.args, list(...)))
}
tlevine/krounq documentation built on May 31, 2019, 3:51 p.m.