category_urls = [ "https://thepiratebay.org/browse/100/0/3", "https://thepiratebay.org/browse/200/0/3", "https://thepiratebay.org/browse/300/0/3", "https://thepiratebay.org/browse/400/0/3", "https://thepiratebay.org/browse/500/0/3", "https://thepiratebay.org/browse/600/0/3" ] result = category_urls |> Enum.map(fn category_url -> 1..50 |> Enum.map(fn i -> String.replace(category_url, "/0/", "/#{i}/") end) end) I'm trying to generate a map of urls I need to crawl.
The code above is generating a map of map of strings for me. I'd like to just flatten it to a simple map of strings.
How can I accomplish this in Elixir?