You could create the Option
first and filter on that with your condition:
Option(result).filter(condition)
or if condition
is not related to result
Option(result).filter(_ => condition)
You could create the Option
first and filter on that with your condition:
Option(result).filter(condition)
or if condition
is not related to result
Option(result).filter(_ => condition)