definition: |
insertToCategory :: Eq b => b -> a -> [(b,[a])] -> [(b,[a])] insertToCategory cat x [] = [(cat,[x])] insertToCategory cat x ((cat',xs):cats) | cat == cat' = ((cat',x:xs):cats) | otherwise = (cat',xs):insertToCategory cat x cats |
demand: |
argument 4 |
deterministic: |
deterministic operation |
failfree: |
(_, _, _, _) |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,_,_,{[]}) |-> {:} || (_,_,_,{:}) |-> {:}} |
name: |
insertToCategory |
precedence: |
no precedence defined |
result-values: |
{:} |
signature: |
Prelude.Eq a => a -> b -> [(a, [b])] -> [(a, [b])] |
solution-complete: |
operation might suspend on free variables |
terminating: |
yes |
totally-defined: |
possibly non-reducible on same data term |