Shows how to use xtd::linq::enumerable::aggregate method.
#include <xtd/xtd>
auto main() -> int {
auto sentence = "the quick brown fox jumps over the lazy dog"_s;
auto words = sentence.split(' ').items();
auto reversed = from(words).aggregate([](const string& working_sentence, const string& next) {
return next + " " + working_sentence;
});
console::write_line(reversed.quoted());
}