How to distinguish between “found” and “not found” in
d = Dict(nothing => 1, 2 => 3) findfirst(==(3), d) # == 2, ok: d == 3 findfirst(==(1), d) # == nothing, ok: d[nothing] = 1 findfirst(==(2), d) # == nothing, but actually not found
For now I do an extra check that
f(d[findfirst(f, d)]) == true, but this doesn’t look clean…
Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the poster here on Discourse so they can follow this thread.
(Original message ) (More Info)