Add Foreach() method
FredTunaB opened this issue · comments
FredTunaB commented
Would it be possible to add a ForEach method for LinqGen.
For example to be able to do:
list.Gen().Where(/*predicate*/).ForEach(/*do something*/)
instead of
foreach (Type x in list.Gen().Where(/*predicate*/)) //Do Something
Maxwell Keonwoo Kang commented
Hello, thank you for trying LinqGen. ForEach
is not supported since it does not have any benefit over using foreach statement. Using ForEach
implies using lambda- essentially cancelling out benefits of LinqGen (Being allocation free and specialized).