fork download
  1. defmodule Main do
  2. def main do
  3. list = %{"100" => 1, "50" => 2, "20" => 4, "10" => 8, "5" => 16, "1" => 32}
  4. IO.inspect Enum.map(list, fn{key, value} -> String.to_integer(key) * value end) , char_lists: :as_lists
  5. for {key, value} <- list, do: IO.puts String.to_integer(key) * value
  6. end
  7. end
  8.  
  9. Main.main
  10.  
Success #stdin #stdout 0.44s 30264KB
stdin
Standard input is empty
stdout
[32, 80, 100, 80, 80, 100]
32
80
100
80
80
100