mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
rename unfold -> recurrence, add-new unfold
This commit is contained in:
parent
a9308ae3ee
commit
b1b7a9fefc
19 changed files with 585 additions and 174 deletions
|
@ -176,6 +176,22 @@ namespace testspr {
|
|||
{}
|
||||
SPROUT_CONSTEXPR result operator()() const { return result{val, gen_iota(val + 1)}; }
|
||||
};
|
||||
//
|
||||
// unf_iota
|
||||
//
|
||||
template<typename T>
|
||||
struct unf_iota {
|
||||
public:
|
||||
struct result {
|
||||
public:
|
||||
T val;
|
||||
public:
|
||||
SPROUT_CONSTEXPR T const& generated_value() const { return val; }
|
||||
SPROUT_CONSTEXPR T const& next_generator() const { return val; }
|
||||
};
|
||||
public:
|
||||
SPROUT_CONSTEXPR result operator()(T const& val) const { return result{val + 1}; }
|
||||
};
|
||||
|
||||
//
|
||||
// distance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue