Use map_join instead of map+join

This commit is contained in:
Claudio Ortolina
2025-02-18 10:14:31 +00:00
parent c25402cd4d
commit 025a5105ed
3 changed files with 3 additions and 12 deletions
+1 -4
View File
@@ -147,10 +147,7 @@ defmodule MusicLibrary.Records do
end
def populate_genres(record) do
artists =
record.artists
|> Enum.map(fn a -> a.name end)
|> Enum.join(",")
artists = Enum.map_join(record.artists, ",", fn a -> a.name end)
completion = %OpenAI.Completion{
content: """