Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Should predicate functions warn when called with a function that is not a predicate? #470
Passing a function that returns a logical vector as the predicate argument to predicate functions can cause unexpected results, as in the example below, from this StackOverflow question.
purrr::every(list(1:10), is.na) #>  TRUE
Perhaps adding a warning message if the predicate evaluates to a logical vector of length > 1 would be appropriate?