3 ms·
Seems like the same thing could be achieved cleanly with chainable results. My quick & dirty c# example. For.Loop(10, (i, @break) => { Console.Wr
by 0xcoffee 4y ago
Seems like the same thing could be achieved cleanly with chainable results. My quick & dirty c# example.
For.Loop(10, (i, @break) =>
{
Console.WriteLine(i);
@break();
})
.OnComplete((i) => Console.WriteLine("Done"))
.OnBreak((i) => Console.WriteLine("Break"));
- levodelellis 4y agoA friend suggested this to me! I felt having `.` on a loop would be weird because it isn't working on an object A few people said they want single statements on conditionals. If `=>` (or `::` as someone else suggested) forced the statement to be on the same line would you be fine? I can imagine people wanting to use it on it's own line like people use else without braces which leads to bugs