|
definition: |
searchTreeSize :: SearchTree _ -> (Int, Int, Int)
searchTreeSize (Value _) = (1, 0, 0)
searchTreeSize (Fail _) = (0, 1, 0)
searchTreeSize (Or t1 t2) = let (v1, f1, o1) = searchTreeSize t1
(v2, f2, o2) = searchTreeSize t2
in (v1 + v2, f1 + f2, o1 + o2 + 1)
|
|
demand: |
argument 1 |
|
deterministic: |
deterministic operation |
|
documentation: |
Return the size (number of Value/Fail/Or nodes) of the search tree |
|
failfree: |
_ |
|
indeterministic: |
might be indeterministic |
|
infix: |
no fixity defined |
|
iotype: |
{({Value}) |-> {(,,)} || ({Fail}) |-> {(,,)} || ({Or}) |-> {(,,)}}
|
|
name: |
searchTreeSize |
|
precedence: |
no precedence defined |
|
result-values: |
{(,,)}
|
|
signature: |
SearchTree a -> (Prelude.Int, Prelude.Int, Prelude.Int) |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
yes |
|
totally-defined: |
reducible on all ground data terms |