diff --git a/packages/yak_runner/lib/src/extension/iterable_run.dart b/packages/yak_runner/lib/src/extension/iterable_run.dart index 80c601f..5e65938 100644 --- a/packages/yak_runner/lib/src/extension/iterable_run.dart +++ b/packages/yak_runner/lib/src/extension/iterable_run.dart @@ -6,78 +6,45 @@ import 'run.dart'; extension IterableNullaryToResultNullaryX on Iterable> { /// returns Iterable> from Iterable> - /// TODO REWORK ITERATOR https://github.com/yakforward-ou/yak_packages/issues/238 - Iterable> get run sync* { - for (final function in this) { - yield function.run; - } - } + Iterable> get run => + [for (final function in this) function.run]; /// returns Iterable from Iterable> - /// TODO REWORK ITERATOR https://github.com/yakforward-ou/yak_packages/issues/238 - Iterable get runVoid sync* { - for (final function in this) { - yield function.runVoid; - } - } + Iterable get runVoid => + [for (final function in this) function.runVoid]; } extension IterableUnaryToResultUnaryX on Iterable> { /// returns Iterable> from Iterable> - /// TODO REWORK ITERATOR https://github.com/yakforward-ou/yak_packages/issues/238 - Iterable> get run sync* { - for (final function in this) { - yield function.run; - } - } + Iterable> get run => + [for (final function in this) function.run]; } extension IterableUnaryToResultUnaryVoidX on Iterable> { /// returns Iterable> from Iterable> - /// TODO REWORK ITERATOR https://github.com/yakforward-ou/yak_packages/issues/238 - Iterable> get runVoid sync* { - for (final function in this) { - yield function.runVoid; - } - } + Iterable> get runVoid => + [for (final function in this) function.runVoid]; } extension IterableNullaryToResultNullaryAsyncX on Iterable> { /// returns Iterable> from Iterable> - /// TODO REWORK ITERATOR https://github.com/yakforward-ou/yak_packages/issues/238 - Iterable> get runAsync sync* { - for (final function in this) { - yield function.runAsync; - } - } + Iterable> get runAsync => + [for (final function in this) function.runAsync]; /// returns Iterable from Iterable> - /// TODO REWORK ITERATOR https://github.com/yakforward-ou/yak_packages/issues/238 - - Iterable get runVoidAsync sync* { - for (final function in this) { - yield function.runVoidAsync; - } - } + Iterable get runVoidAsync => + [for (final function in this) function.runVoidAsync]; } extension IterableUnaryToResultUnaryAsyncX on Iterable> { /// returns Iterable> from Iterable> - /// TODO REWORK ITERATOR https://github.com/yakforward-ou/yak_packages/issues/238 - Iterable> get runAsync sync* { - for (final function in this) { - yield function.runAsync; - } - } + Iterable> get runAsync => + [for (final function in this) function.runAsync]; /// returns Iterable> from Iterable> - /// TODO REWORK ITERATOR https://github.com/yakforward-ou/yak_packages/issues/238 - Iterable> get runVoidAsync sync* { - for (final function in this) { - yield function.runVoidAsync; - } - } + Iterable> get runVoidAsync => + [for (final function in this) function.runVoidAsync]; }