CurryInfo: containers-3.0.0 / Data.Map.insertWith

definition:
insertWith :: Ord k => (a -> a -> a)
           -> k -> a -> Map k a -> Map k a
insertWith _ k a Tip = singleton k a
insertWith combiner new_k new_a (Bin k a sizeM m_l m_r)
  = if new_k < k
    then mkBalBranch k a (insertWith combiner new_k new_a m_l) m_r
    else
      if new_k == k
      then Bin new_k (combiner a new_a) sizeM m_l m_r
      else mkBalBranch k a m_l (insertWith combiner new_k new_a m_r)
demand:
argument 5
deterministic:
deterministic operation
documentation:
--- Instead of throwing away the old binding,
--- insertWith combines the new element with the old one.
--- @param combiner a function combining to elements
--- @param k the key of the elements to be combined
--- @param a the new element
--- @param m a map
--- @result a modified map
failfree:
(_, _, _, _, _)
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,_,_,{Tip}) |-> {Bin} || (_,_,_,_,{Bin}) |-> {Bin}}
name:
insertWith
precedence:
no precedence defined
result-values:
{Bin}
signature:
Prelude.Ord b => (a -> a -> a) -> 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