pmapUnionWith optimization
There is no reason to have `ps` unless the current key is a duplicate entry.
This commit is contained in:
parent
6347a7b569
commit
d5d39e0078
1 changed files with 1 additions and 2 deletions
|
|
@ -217,11 +217,10 @@ pmapUnionWith = phoistAcyclic $
|
||||||
# plam
|
# plam
|
||||||
( \p -> P.do
|
( \p -> P.do
|
||||||
pf <- plet $ pfstBuiltin # p
|
pf <- plet $ pfstBuiltin # p
|
||||||
ps <- plet $ psndBuiltin # p
|
|
||||||
pmatch (plookup # pf # ys) $ \case
|
pmatch (plookup # pf # ys) $ \case
|
||||||
PJust v ->
|
PJust v ->
|
||||||
-- Data conversions here are silly, aren't they?
|
-- Data conversions here are silly, aren't they?
|
||||||
ppairDataBuiltin # pf # pdata (f # pfromData ps # pfromData v)
|
ppairDataBuiltin # pf # pdata (f # pfromData (psndBuiltin # p) # pfromData v)
|
||||||
PNothing -> p
|
PNothing -> p
|
||||||
)
|
)
|
||||||
# xs
|
# xs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue