One example from the top of my head is finding the minimum and maximum of a list. One can use list.min() and list.max(), but it means iterating twice even if it is clearer code. One can use a reduce/Aggregate with a seed that is a tuple, but it's difficult to read. In the end, good old for or foreach loop is the simpler option.
Maybe that's not the best example, but it's what I came up with on a short notice.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
One example from the top of my head is finding the minimum and maximum of a list. One can use list.min() and list.max(), but it means iterating twice even if it is clearer code. One can use a reduce/Aggregate with a seed that is a tuple, but it's difficult to read. In the end, good old for or foreach loop is the simpler option.
Maybe that's not the best example, but it's what I came up with on a short notice.