Logo

Programming-Idioms

History of Idiom 7 > diff from v24 to v25

Edit summary for version 25 by :

Version 24

2015-08-22, 22:59:46

Version 25

2015-09-03, 12:39:20

Idiom #7 Iterate over list indexes and values

Print each index i with its value x from an array-like collection items

Idiom #7 Iterate over list indexes and values

Print each index i with its value x from an array-like collection items

Code
sequence_ [print (i,x) | (i,x) <- zip [0..] items]