Count nested foralls for telescope compression.
(&self)
| 132 | |
| 133 | /// Count nested foralls for telescope compression. |
| 134 | pub fn all_telescope_count(&self) -> u64 { |
| 135 | let mut count = 0u64; |
| 136 | let mut curr = self; |
| 137 | while let Expr::All(_, body) = curr { |
| 138 | count += 1; |
| 139 | curr = body.as_ref(); |
| 140 | } |
| 141 | count |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | #[cfg(test)] |