Cannot reduce an empty iterable w/o an explicit seed value

Nicholas Wilson iamthewilsonator at hotmail.com
Thu Nov 9 13:31:42 UTC 2017


On Thursday, 9 November 2017 at 12:40:49 UTC, Vino wrote:
> Hi All,
>
>   Request your help, when i execute the below line of code i am 
> getting an error message as "Cannot reduce an empty iterable 
> w/o an explicit seed value" , The below lie of code will 
> iterate several file system and will report the size of the 
> folder (level 1) which is greater than 10GB.

The reason you get this is because when evaluating an empty 
directory there are no files, so it is like you are trying to do
>    [].sum
which can give no sensible result.



More information about the Digitalmars-d-learn mailing list