Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 991 Bytes

File metadata and controls

51 lines (37 loc) · 991 Bytes

description: Caps the depth of an expression.

Module: expression_impl.depth_limit

View source on GitHub

Caps the depth of an expression.

Suppose you have an expression expr modeled as:

  *
   \
    A
   / \
  D   B
       \
        C

if expr_2 = depth_limit.limit_depth(expr, 2) You get:

  *
   \
    A
   / \
  D   B

Functions

limit_depth(...): Limit the depth to nodes k steps from expr.