Re: Convert program to 2020: replace foreach loop with map, filter and friends

2020-03-30 Thread Vladimir Panteleev via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 04:00:28 UTC, User wrote: I'd like to convert the following program to 2020 standards (i.e, replace the foreach block with a one-line code). I've tried much and I failed. Here is how I'd do it. Because the program downloads and then reads the local file unconditi

Convert program to 2020: replace foreach loop with map, filter and friends

2020-03-30 Thread User via Digitalmars-d-learn
I'd like to convert the following program to 2020 standards (i.e, replace the foreach block with a one-line code). I've tried much and I failed. This is the code that works (1990s style) -- import std; void main() { immutable URL = r"https://raw.githubusercontent.com/CSSEGISandData/COVID