2 ms·
I didn't write what you wrote ;-) foreach takes a collection and applies some function (in this case println). I've actually had a use case for what you're tr
by virtualwhys 13y ago
I didn't write what you wrote ;-)
foreach takes a collection and applies some function (in this case println).
I've actually had a use case for what you're trying do, so created an extension method on Any, which means you can then do, on Any-thing:
(list filter isEven sum).echo
I also hate typing "println". "echo" I can bang out instantly, and can do so on any expression, before or after its definition.