| 19 | } |
| 20 | |
| 21 | static constexpr auto write_array(auto array, auto len) noexcept { |
| 22 | constexpr struct : local {} stack; |
| 23 | constexpr auto i = var_(stack)[0]; |
| 24 | return block_( |
| 25 | putc_('['), |
| 26 | for_(i = 0, i < len, ++i)( |
| 27 | if_(i > 0)( |
| 28 | str::puts(str::literal(", ")) |
| 29 | ), |
| 30 | io::write<Num>(array[*i]) |
| 31 | ), |
| 32 | putc_(']'), |
| 33 | putc_('\n') |
| 34 | ); |
| 35 | } |
| 36 | |
| 37 | enum { |
| 38 | MERGESORT, |