This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <utility> | |
// left fold by hand | |
template <typename F,typename Acc, typename... T> | |
constexpr auto foldLeft_initial(F func, Acc acc, T... xs) | |
{ | |
auto step = [=](auto self, auto acc_, auto x_, auto... xs_) | |
{ | |
auto sum = func(acc_, x_); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
template<typename Lhs, typename Rhs> | |
struct assignment_t | |
{ | |
using lhs_t = Lhs; | |
using rhs_t = Rhs; | |
lhs_t _lhs; | |
rhs_t _rhs; | |
}; |