Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Rust
print!("{}", "Hello\n".repeat(10));
for _ in 0..10 { println!("Hello"); }

0..10 syntax creates range iterator.

The compiler doesn't report unused variables prefixed with an underscore.
with Ada.Text_IO;
use Ada.Text_IO;
for I in 1 .. 10 loop
  Put_Line ("Hello");
end loop;

New implementation...
< >
programming-idioms.org