|
|
Warp wrote:
> I don't know... This kind of defeats the whole purpose of a high-level
> language where you are supposed to not to have to worry about internal
> implementation details of the compiler.
I think you could do it the same way you do it in C, if you need to:
iterate over the list and add up only the elements you're interested in.
fold goes from yadda.begin() to yadda.end(). If you don't want to do
that, use a different function. Or write it more iteratively, so to
speak. Think about your C++ implementation of fold - you would have to
copy the list there too if you wanted to use that on a subset.
--
Darren New / San Diego, CA, USA (PST)
Post a reply to this message
|
|