Skip to content

Im-dex/eXstream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eXstream

C++ 14 library that provides functional-style stream operations under collections.

Example

struct Person
{
    std::string name;
    std::set<int> marks;
};

std::vector<Person> persons = { ... };

stream_of(persons)
    .flat_map([](auto person) { return std::ref(person.marks); })
    .filter  ([](auto mark)   { return mark > 0; })
    .distinct()
    .collect(to_set());
    
stream_of(persons)
    .map   ([](auto person) { return std::ref(person.name); })
    .filter([](auto name)   { return name != "Mike"s; })
    .collect(to_list());

About

Functional-style streams library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published