Bifurcate list based on function
Splits values into two groups, based on the result of the given filtering function.
- Use a list comprehension to add elements to groups, based on the value returned by
fnfor each element. - If
fnreturns a truthy value for any element, add it to the first group, otherwise add it to the second group.