definition: |
constructPredMap :: [Node] -> [(NodeID, [NodeID])] constructPredMap [] = [] constructPredMap (node:nodes) = insertPreds (constructPredMap nodes) currChildren where currChildren = getNodeChildren node insertPreds = foldl (insertMapKey (getNodeId node)) insertMapKey val m key = case lookup key m of Nothing -> (key, [val]) : m Just list -> (key, (val : list)) : (filter ((/= key) . fst) m) |
demand: |
argument 1 |
deterministic: |
deterministic operation |
documentation: |
-- Build a Map from NodeID to the corresponding node's predecessors' nodeIDs. |
failfree: |
_ |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{({[]}) |-> {[]} || ({:}) |-> _} |
name: |
constructPredMap |
precedence: |
no precedence defined |
result-values: |
_ |
signature: |
[Node] -> [(Prelude.Int, [Prelude.Int])] |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |