Skip to content

Commit

Permalink
perf: faster standalone compact
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke committed Jan 23, 2025
1 parent fa4fcbd commit ca42ac5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/standalone-purrr.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ map_if <- function(.x, .p, .f, ...) {
}

compact <- function(.x) {
Filter(length, .x)
.x[as.logical(lengths(.x))]
}

transpose <- function(.l) {
Expand Down

0 comments on commit ca42ac5

Please sign in to comment.