Looking at yearly solar irradiation actually underplays the disadvantage we have in northern Europe in terms of PV. If all we had to do is built twice the capacity that would be one thing but our winters are quite dark, making PV energy generation almost negible around the winter solstice. Whatever generation capacity we can displace in the summer we still have to keep around to make up the shortfall in December. I love when I see solar panels here but rationally speaking Germany and the Netherlands should be among the late adopters.
It's easy but it ain't simple. Because `f` can do arbitrary things to `x` you have to look at it just to know the general shape of the computation. Reduce gives you a lot of the flexibility of imperative programming but with that also a lot of the problems. Sometimes that's the right trade-off but it is good to be aware that it is a trade-off.
For me it's about the speed of understanding what the code does. Because filter and map are very constrained in what they can do they quickly tell me a lot about the shape of the computation I'm working with. In contrast reduce is much more flexible and so I need to do a much more detailed analysis to just answer a basic question like "is the result a scalar or another collection?".
reply