TreeReader.count

counts and returns number of nodes in the tree

if doCount is not null, only nodes for which doCount function returns true will be counted

  1. uinteger count()
  2. uinteger count(bool function(TreeNode!(T)*) doCount)
    struct TreeReader(T)
    count
    (
    bool function
    ()
    doCount = null
    )

Return Value

Type: uinteger

number of nodes for which doCount(node) returned true

Meta