▲ | mrkeen 5 days ago | |
* I don't think you meant to compare forcing each element (as opposed to forcing the input or output data structures) * If you did mean it that way, I doubt Python can avoid forcing each element that goes through its generators. (Without, say, thunking up each element manually or using a generator of generators, etc.) Here is Haskell using a fold and a map. It does not force the input, the output, or each element:
|