-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
else clause in map_if #324
Comments
I don't think that will happen because cnd <- map_lgl(x, predicate)
x <- map_if(x, cnd, fun1)
x <- map_if(x, !cnd, fun2) |
Yes yes that is a possible solution. But it would be more concise if one could do it in one line, like> |
in purrr's syntax, |
We could have |
without the dots? |
We could still have dots, but they'd be passed to both |
Why the following solution is not viable?
regards |
I fell that i order for the map_if function to be really useful should have the possibility of calling an "else" function if the outcome of .predicate is false.
By default it should leave the object iterated alone, and not return anything.
The text was updated successfully, but these errors were encountered: