MCPcopy Create free account
hub / github.com/SheafificationOfG/based-cpp / write_array

Function write_array

mergesort.cpp:21–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21static 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
37enum {
38 MERGESORT,

Callers 1

mergesort.cppFile · 0.85

Calls 7

var_Function · 0.85
block_Function · 0.85
putc_Function · 0.85
for_Function · 0.85
if_Function · 0.85
putsFunction · 0.85
literalFunction · 0.85

Tested by

no test coverage detected