TGViewer
Блог* Блог* @dereference_pointer_there · 1.98K subscribers
Post #11514 402
Ну #prog... Кусочек, это и статьёй-то не назвать, скорее, #tips

Printing Lists

To print a comma-separated list, a concise idiom is to optionally print the comma first, before the element:


for (items, 0..) |item, item_index| {
if (item_index > 0) std.debug.print(", ");
std.debug.print("{}", .{item});
}
matklad.github.io Printing Lists To print a comma-separated list, a concise idiom is to optionally print the comma first, before the element:
  • ❤ 5
  • 🥴 2
More from @dereference_pointer_there
  1. Sep 23, 2026#politota #meme
  2. Sep 23, 2026#prog #article Steering Zig Fmt TL;DR (но вообще заметка маленькая): zig fmt не имеет the…
  3. Sep 22, 2026#prog #article Everyone Says Assembly Is Untyped—Everyone Is Wrong TL;DR: I believe Odin’s…
  4. Sep 22, 2026оф оказался полезным сайтом
  5. Sep 22, 2026#ml #successstory?..
  6. Sep 22, 2026#prog #rust #article Why building a Rust LSP is hard This will be a (hopefully coherent) s…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →