BlackToppStudios / Mezz_Foundation

Foundational Data types that enforce no opinions on how to build games and provide many facilities that complex games need. This largely avoids graphics and physics, but provides tools like the SortedVector, CountedPtr and HashedString classes.
GNU General Public License v3.0
3 stars 0 forks source link

In the function tools functors and drains add automatic currying for data #75

Open Sqeaky opened 4 years ago

Sqeaky commented 4 years ago

All of the Functors and most of the Drains have modes that accept predicates and return functions. It should be possible to adjust these to do the same when passed containers with data. Here is an example of what that might look like from the FunctionalToolsTests.h

const auto SelectFromOneToTen = Select(OneToTen);
TEST("SelectAutoCurriedOnData<Implicit>(OneToTen)", OneToTenOnlyEven == SelectFromOneToTen(IsEven))