pub fn safe_index_optimised(m: Expression, idx: Literal) -> Option<Expression>Expand description
This is the same as m[x] except when m is of the forms:
n[..], then it produces n[x] instead of n[..][x]flatten(n), then it producesn[y]instead offlatten(n)[y], whereyis the full index corresponding to flat indexx
ยงReturns
Some(expr)if the safe indexing could be constructedNoneif it could not be constructed (e.g. invalid index type)