Skip to contents

Leaves have depth 0; an eml node has depth 1 + max(depth(left), depth(right)).

Usage

eml_depth(expr)

Arguments

expr

an EML expression.

Value

Integer scalar.

See also

Other eml_inspectors: eml_K(), eml_leafcount(), eml_rpn()

Examples

eml_depth(quote(eml(x, 1))) # 1
#> [1] 1
eml_depth(quote(eml(1, eml(eml(1, x), 1)))) # 3
#> [1] 3