CurryInfo: string-trie-0.0.2 / Data.Trie.Internal.update'

definition: Info
 
update' :: String -> (Maybe a -> a) -> InternalTrie a -> (Bool, InternalTrie a)
update' []     f (InternalTrie old ts) = (isNothing old,  InternalTrie (Just $ f old) ts)
update' (c:cs) f (InternalTrie v' ts) = case Prelude.lookup c ts of
  Nothing -> let t' = singleton' cs (f Nothing)
             in (True, InternalTrie v' ((c, t') : ts))
  Just t  -> let (incr, t') = update' cs f t
             in (incr, InternalTrie v' ((c, t') : (filter (\(c', _) -> c' /= c) ts)))
demand: Info
 arguments 1 3
deterministic: Info
 deterministic operation
documentation: Info
 
Updates or inserts a value in the internal trie and
returns whether the size has increased.
failfree: Info
 (_, _, _)
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {({[]},_,{InternalTrie}) |-> {(,)} || ({:},_,{InternalTrie}) |-> {(,)}}
name: Info
 update'
precedence: Info
 no precedence defined
result-values: Info
 {(,)}
signature: Info
 String -> (Prelude.Maybe a -> a) -> InternalTrie a
-> (Prelude.Bool, InternalTrie a)
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term