// // fold.hpp // stream // // Created by Sam Jaffe on 8/14/16. // #pragma once #include namespace stream { template struct fold_left_t { L init; std::function fold; }; } template L operator >(stream::detail::stream_base const &s, stream::fold_left_t && f) { return std::accumulate(s.begin(), s.end(), f.fold, f.init); }