2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-01 08:32:11 +00:00

[Foldable] Rename the different fold variants

- Rename fold{l,r,l1,r1} to fold.{right,left} with overloads.
- Rename foldlM/foldrM to monadic_fold.{left,right}
- Add no-state variants of the monadic folds
- Improve the fold's documentation
- Deprecate the previous folds; they'll be removed soon

Fixes #18.
This commit is contained in:
Louis Dionne
2015-03-30 08:26:10 -04:00
parent 540f665e51
commit 2c86ba2390
57 changed files with 1027 additions and 830 deletions

View File

@@ -59,7 +59,7 @@ BOOST_HANA_CONSTANT_CHECK(
//! [foldable]
auto sum_string = [](auto str) {
return foldl(str, int_<0>, [](auto sum, auto c) {
return fold.left(str, int_<0>, [](auto sum, auto c) {
constexpr int i = value(c) - 48; // convert character to decimal
return sum + int_<i>;
});