Try using Enum.map instead. Enum.each doesn’t have any output, so that’s why it doesn’t work. for comprehensions and Enum.map would work similarly in your case.
Try using Enum.map instead. Enum.each doesn’t have any output, so that’s why it doesn’t work. for comprehensions and Enum.map would work similarly in your case.