current method system defines methods directly like a function:
fn map[X, Y](self: MyList[X], f: (X) -> Y) -> List[Y] { ... }
and we may have many functions for a single struct or enum.
while it’s more convenient to add, it loses convenience of folding whole group like Rust,
impl A_STRUCT { // foldable from this line in editors
fn method_1() {}
fn method_2() {}
}
this folding feature is useful when we have multiple structs in a same file.
is there alternative syntax in Moonbit that make folding this group possible? Or any other suggestion for such cases?