Sorry, IMO, another complicate it
evolution example.
How do I write the new correct form?
julia> contains(==, fieldnames(GMT.GMTgrid), Symbol("z"))
┌ Warning: `contains(eq::Function, itr, x)` is deprecated, use `any((y->begin
│ eq(y, x)
│ end), itr)` instead.
│ caller = top-level scope
└ @ Core :0
true
julia> any((y->begin == end), fieldnames(GMT.GMTgrid), Symbol("z"))
ERROR: MethodError: no method matching start(::Symbol)
Closest candidates are:
start(::SimpleVector) at essentials.jl:550
start(::Base.MethodList) at reflection.jl:659
start(::ExponentialBackOff) at error.jl:171
...
Stacktrace:
[1] reduced_indices(::Tuple{Base.OneTo{Int64}}, ::Symbol) at .\reducedim.jl:35
[2] reduced_indices at .\reducedim.jl:6 [inlined]
[3] reducedim_initarray at .\reducedim.jl:79 [inlined]
[4] reducedim_initarray at .\reducedim.jl:80 [inlined]
[5] reducedim_init at .\reducedim.jl:133 [inlined]
[6] mapreducedim at .\reducedim.jl:272 [inlined]
[7] any(::Function, ::Array{Symbol,1}, ::Symbol) at .\reducedim.jl:612
[8] top-level scope