Logo

Programming-Idioms

History of Idiom 256 > diff from v37 to v38

Edit summary for version 38 by programming-idioms.org:
[Haskell] Comments conciseness

Version 37

2023-03-24, 03:51:55

Version 38

2023-03-26, 09:14:33

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
foldl  (\res x-> x:res) [] [0..5]
Code
foldl  (\res x-> x:res) [] [0..5]
Comments bubble
Note that this creates a reversed list (but only print it if you're in repl)
Comments bubble
This creates a reversed list (and prints it if you're in REPL)