Logo

Programming-Idioms

History of Idiom 256 > diff from v17 to v18

Edit summary for version 18 by norom:
New Rust implementation by user [norom]

Version 17

2021-08-23, 02:59:36

Version 18

2021-08-23, 08:43:45

Idiom #256 Count backwards

Print the numbers 5, 4, ..., 0 (included), one line per number.

Idiom #256 Count backwards

Print the numbers 5, 4, ..., 0 (included), one line per number.

Extra Keywords
countdown negative step reverse
Extra Keywords
countdown negative step reverse
Code
(0..=5).rev().for_each(|i| println!("{}", i));