Re:A liar who always lies says "All my hats are green."
by gpderetta on Monday December 09, 2024 @01:27PM
(#42368919)
yes of course, I was trying (and failed?) to draw a connection from all_of to accumulate (i.e. fold).
Re:A liar who always lies says "All my hats are green."
by JadeNB on Monday December 09, 2024 @04:21PM
(#42370644)
Ah, my apologies. I don't know my way around C++, and, by reading your comment too quickly, misread it to be saying that `all_of` behaved badly, rather than that its behavior could be better understood by looking elsewhere.
Because it is, if you'll forgive my Haskell-ese, the only implementation that means that `all_of $ l1 ++ l2 == (all_of l1) && (all_of l2)` for all lists `l1` and `l2`, including empty ones.