pub(crate) fn list_to_tuple(x: AstExpr) -> AstExpr {
    match x {
        Spanned {
            node: Expr::List(x),
            span,
        } => Spanned {
            node: Expr::Tuple(x),
            span,
        },
        _ => x,
    }
}
/// Convert a list into a tuple. In many cases (iteration, `in`) these types
/// behave the same, but a list has identity and mutability, so much better to
/// switch to tuple where it makes no difference. A tuple of constants
/// will go on the FrozenHeap, while a list of constants will be continually
/// reallocated.
Convert a list into a tuple. In many cases (iteration, `in`) these types
behave the same, but a list has identity and mutability, so much better to
switch to tuple where it makes no difference. A tuple of constants
will go on the FrozenHeap, while a list of constants will be continually
reallocated.
Convert a list into a tuple . In many cases ( iteration ` in ` ) these types behave the same but a list has identity and mutability so much better to switch to tuple where it makes no difference . A tuple of constants will go on the FrozenHeap while a list of constants will be continually reallocated .
pub(crate) fn list_to_tuple(x: AstExpr) -> AstExpr {
    match x {
        Spanned {
            node: Expr::List(x),
            span,
        } => Spanned {
            node: Expr::Tuple(x),
            span,
        },
        _ => x,
    }
}
pub ( crate ) fn list_to_tuple ( x : AstExpr ) -> AstExpr { match x { Spanned { node : Expr :: List ( x ) , span , } => Spanned { node : Expr :: Tuple ( x ) , span , } , _ => x , } }
Convert a list into a tuple.
Convert a list into a tuple .
x
AstExpr
x
AstExpr