mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[yul-phaser] Mutations: Add mutationSequence()
This commit is contained in:
@@ -95,6 +95,18 @@ function<Mutation> phaser::alternativeMutations(
|
||||
};
|
||||
}
|
||||
|
||||
function<Mutation> phaser::mutationSequence(vector<function<Mutation>> _mutations)
|
||||
{
|
||||
return [=](Chromosome const& _chromosome)
|
||||
{
|
||||
Chromosome mutatedChromosome = _chromosome;
|
||||
for (size_t i = 0; i < _mutations.size(); ++i)
|
||||
mutatedChromosome = _mutations[i](move(mutatedChromosome));
|
||||
|
||||
return mutatedChromosome;
|
||||
};
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user