CurryInfo: containers-3.0.0 / Data.Map.unionWith

definition:
unionWith :: Ord k => (a -> a -> a)
          -> Map k a -> Map k a -> Map k a
unionWith _        Tip m2 = m2
unionWith _        m1@(Bin _ _ _ _ _) Tip = m1
unionWith combiner (Bin split_key1 a1 _ left1 right1) m2@(Bin _ _ _ _ _)
  = mkVBalBranch split_key1 new_a
                 (unionWith combiner left1 lts)
                 (unionWith combiner right1 gts)
  where
    lts   = splitLT m2 split_key1
    gts   = splitGT m2 split_key1
    new_a = case lookup split_key1 m2 of
              Nothing -> a1
              Just a2 -> combiner a2 a1
demand:
arguments 3 4
deterministic:
deterministic operation
documentation:
--- Efficiently combine key/element mappings of two maps into a single one,
--- cf. insertWith
failfree:
(_, _, _, _)
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,{Tip},_) |-> _ || (_,_,{Bin},{Tip}) |-> {Bin} || (_,_,{Bin},{Bin}) |-> {Bin}}
name:
unionWith
precedence:
no precedence defined
result-values:
_
signature:
Prelude.Ord b => (a -> a -> a) -> Map b a -> Map b a -> Map b a
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term