fold<R> method
R
fold<R>({
- required R single(),
- required R multi(),
- required R tree(),
Implementation
R fold<R>({
required R Function() single,
required R Function() multi,
required R Function() tree,
}) {
switch (this) {
case BuildFormat.single:
return single();
case BuildFormat.multi:
return multi();
case BuildFormat.tree:
return tree();
}
}