There's more...

The standard library provides a similar function, named reduce()which does the same operation as fold. The difference between the two is that fold takes an explicit initial value, whereas reduce uses the first element from the list as the initial value. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.119.101