# Isn't there a nicer way to combine multiple `Union{T, Nothing}`

Let me comment more on it why it is not possible given the discussion in the comments.

In Julia function arguments are evaluated eagerly, so Julia evaluates both `find(r, n, start + 1, which)`

and `find(r, n - 1, start + 1, extended)`

before passing them to `something`

function.

Now, with macros you have (I am not writing in a fully general case for simplicity and I hope I got the hygiene right :)):

```
julia> macro something(x, y)
quote
local vx = $(esc(x))
isnothing(vx) ? $(esc(y)) : vx
end
end
@something (macro with 1 method)
julia> @something 1 2
1
julia> @something nothing 2
2
julia> @something 1 sqrt(-1)
1
julia> @something nothing sqrt(-1)
ERROR: DomainError with -1.0:
sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).
```

(in a full-blown version of the macro varargs and `Some`

should be handled to replicate `something`

exactly)