if `dismiss` returns `Unit` I'd choose `2`. In `2`...
# codingconventions
r
if
dismiss
returns
Unit
I'd choose
2
. In
2
the effect invocation is still in the context of absence but in 1 you are providing an alternate path based on a boolean check. 2 is in a way a chain of monadic binds and you still obtain a value from it whereas 1 is just side effecting and you get no value back from the potential application of
dismiss()