1
2
3
4
5
6
7
8
9
10
use crate::{Expression, ExpressionArray};
use std::ops::Index;
impl Index<&[usize]> for ExpressionArray {
type Output = Expression;
fn index(&self, indices: &[usize]) -> &Self::Output {
self.elems().get(indices).unwrap_or(&self.default)
}
}