Hi folks,
again I have some trouble with the declaration
I’ve read your concepts again and again and Collections and Data Structures · The Julia Language
but have no idea how to solve it.
I create an array:
a_stops =
where I put all stops in with push
and at the end I have an Array Any[
which should be just [
(see below)
any ideas, how to declare
I guess it is something with …, but how?
thanks for any help!
And, there are some typografically errors also (about to come) in the description
‘’’
function add_missing_stops(route, stops…)
a_stops =
d_route = Dict{String, Any}()
for i in eachindex(stops)
push!(a_stops, stops[i].second)
end
#= did not work:
d_route[“from”] = [route[“from”]]
d_route[“to”] = [route[“to”]]
d_route[“stops”] = a_stops
@show typeof(a_stops)
d_route=#
‘’‘# brings the same result:
Dict(“from” => route[“from”], “to” => route[“to”], “stops” => a_stops)
‘’’# route[“stops”].second = a_stops
‘’‘# for each
end
‘’’
I just saw in the hints, that map() will bring the solution.
…will look it up
