procs = Enum.to_list(1..3) |> Enum.map(fn m -> :"p#{m}") pids = Enum.map(procs, fn p -> ShopServer.start(p, procs)) pids |> Enum.map(fn p -> Process.exit(p, :kill) end) max = 100 1..max |> Enum.to_list() |> Enum.reduce(%{}, fn n, acc -> Map.put(acc, n, :not_reseverd) end) |> " # " " #1# " " # " " # # " " #0# #2# " " # # " " # " " #4# " " # " " # " " #1# " " # " " # # " " #0# #2# " " # # " " # # " " #7# #3# " " # # " " # # " " #6# #4# " " # # " " # " " #5# " " # " " # " " #1# " " # " " # # " " #0# #2# " " # # " " #11 #3# " " # # " " # # " " #10 #4# " " # # " " # # " " #9# #5# " " # # " " #8# #6# " " # # " " # " " #7# " " # " " # " " #1# " " # " " # # " " #0# #2# " " #15 #3# " " # # " " # # " " #14 #4# " " # # " " # # " " #13 #5# " " # # " " # # " " #12 #6# " " # # " " # # " " #11 #7# " " #10 #8# " " # # " " # " " #9# " " # " " # " " #1# " " # " " # # " " #0# #2# " " #19 #3# " " # # " " # # " " #18 #4# " " #17 #5# " " # # " " # # " " #16 #6# " " # # " " #15 #7# " " # # " " #14 #8# " " # # " " # # " " #13 #9# " " #12 #10 " " # # " " # " " #11 " " # " " # " " #1# " " # " " # # " " #0# #2# " " #23 #3# " " # # " " #22 #4# " " #21 #5# " " # # " " #20 #6# " " # # " " # # " " #19 #7# " " # # " " # # " " #18 #8# " " # # " " #17 #9# " " #16 #10 " " # # " " #15 #11 " " #14 #12 " " # # " " # " " #13 " " # "