Background
I have 2 lists with the following format:
["Div", "Season", "Date", "HomeTeam", "AwayTeam"]
["SP1", "201617", "19/08/2016", "La Coruna", "Eibar"]
My objective is to create a map with the following structure:
%{
"Div" => "SP1",
"Season" => 201617,
"Date" => "19/08/2016",
"HomeTeam" => "La Coruna",
"AwayTeam" => "Eibar"
}
Research and difficulties
I searched for the Enum
documentation and I couldn’t find any function that does this. I am also not aware of a way of doing it because the only algorithm I can currently think on is index based, and Enum functions don’t expose the indexes of the values you are currently iterating on.
Question
How can I do this?