Skip to content

Commit

Permalink
Restore .x docs; tweak example
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Aug 20, 2024
1 parent 8c9fb23 commit d502b35
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion R/reduce.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' function that takes two values and returns a single value: reducing
#' `f` over `1:3` computes the value `f(f(1, 2), 3)`.
#'
#' @inheritParams map
#' @param ... Additional arguments passed on to the reduce function.
#'
#' We now generally recommend against using `...` to pass additional
Expand All @@ -16,7 +17,7 @@
#' # Instead of
#' x |> reduce(f, 1, 2, collapse = ",")
#' # do:
#' x |> reduce(\(x) f(x, 1, 2, collapse = ","))
#' x |> reduce(\(x, y) f(x, y, 1, 2, collapse = ","))
#' ```
#'
#' This makes it easier to understand which arguments belong to which
Expand Down
4 changes: 3 additions & 1 deletion man/reduce.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/reduce_right.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d502b35

Please sign in to comment.