mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-24 06:54:03 +03:00
Use dict merge function to avoid Dict.toList/fromList.
This commit is contained in:
parent
8b4144ef15
commit
4ebc578c21
@ -77,10 +77,13 @@ strippedResponsesHelp usedSoFar appType request rawResponses =
|
||||
|
||||
Ok ( partiallyStrippedResponses, followupRequest ) ->
|
||||
strippedResponsesHelp
|
||||
(((usedSoFar |> Dict.toList)
|
||||
++ (partiallyStrippedResponses |> Dict.toList)
|
||||
)
|
||||
|> Dict.Extra.fromListDedupe merge
|
||||
(Dict.merge
|
||||
(\key a -> Dict.insert key a)
|
||||
(\key a b -> Dict.insert key (merge a b))
|
||||
(\key b -> Dict.insert key b)
|
||||
usedSoFar
|
||||
partiallyStrippedResponses
|
||||
Dict.empty
|
||||
)
|
||||
appType
|
||||
followupRequest
|
||||
|
Loading…
Reference in New Issue
Block a user