3 ms·
I’m confused. Do you not think that would have been a good opportunity to teach that person what folds are for? Fold/reduce is fundamental. It’s weird to me th
by yakshaving_jgt 3y ago
I’m confused. Do you not think that would have been a good opportunity to teach that person what folds are for?
Fold/reduce is fundamental. It’s weird to me that its use would be discouraged or outlawed somewhere.
- jrockway 3y agoIf your language has a `for` keyword, I would just say use the `for` keyword.
- yakshaving_jgt 3y agoBut why? The language I use has various flavours of `for`. It also has various flavours of map and fold. It also has recursion. They each do different things. Those differences are meaningful and useful. Why would you limit yourself to just using `for`?
- izietto 3y agoIt depends. It isn't the case for Ruby, for example.