Skip to content

Commit

Permalink
added imap_vec()
Browse files Browse the repository at this point in the history
  • Loading branch information
edavidaja committed Aug 15, 2024
1 parent 73a291c commit 8d2ad6e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export(imap_dfr)
export(imap_int)
export(imap_lgl)
export(imap_raw)
export(imap_vec)
export(imodify)
export(insistently)
export(invoke)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# purrr (development version)

* Added `imap_vec()` (#1084)

# purrr 1.0.2

* Fixed valgrind issue.
Expand Down
7 changes: 7 additions & 0 deletions R/imap.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ imap_dbl <- function(.x, .f, ...) {
map2_dbl(.x, vec_index(.x), .f, ...)
}

#' @rdname imap
#' @export
imap_vec <- function(.x, .f, ...) {
.f <- as_mapper(.f, ...)
map_vec(.x, vec_index(.x), .f, ...)
}


#' @export
#' @rdname imap
Expand Down
3 changes: 3 additions & 0 deletions man/imap.Rd

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

0 comments on commit 8d2ad6e

Please sign in to comment.