noahsettersten
commited on
Commit
•
91b179b
1
Parent(s):
7c89e37
perf: Combine `map` & `join` into `map_join`
Browse files
lib/medical_transcription/utilities.ex
CHANGED
@@ -16,7 +16,6 @@ defmodule MedicalTranscription.Utilities do
|
|
16 |
|
17 |
def tally_to_string(tallied_enumerable) do
|
18 |
tallied_enumerable
|
19 |
-
|> Enum.
|
20 |
-
|> Enum.join(", ")
|
21 |
end
|
22 |
end
|
|
|
16 |
|
17 |
def tally_to_string(tallied_enumerable) do
|
18 |
tallied_enumerable
|
19 |
+
|> Enum.map_join(", ", fn {key, value} -> "#{key} (#{value})" end)
|
|
|
20 |
end
|
21 |
end
|