I need to check if a string is present in a list, and call a function which accepts a boolean accordingly.
Is it possible to achieve this with a one liner?
The c
And if you didn't want to use strict equality, you could use exists:
myFunction(strings.exists { x => customPredicate(x) })