Great article! I was unaware of the implementation details of max and min and really enjoyed learning about them.
There's also a minor tweak I'd consider making to the article. When discussing why max needs to have -Infinity as its identity you say, "If it were 0 then, if our list of numbers had a negative number in it, max would return 0."
This isn't quite right as it might return a number higher than 0 if it appears in the list. It should probably read something like "If it were 0 then, if our list of numbers had only negative numbers in it, max would return 0."
Great article! I was unaware of the implementation details of max and min and really enjoyed learning about them.
There's also a minor tweak I'd consider making to the article. When discussing why max needs to have -Infinity as its identity you say, "If it were 0 then, if our list of numbers had a negative number in it, max would return 0."
This isn't quite right as it might return a number higher than 0 if it appears in the list. It should probably read something like "If it were 0 then, if our list of numbers had only negative numbers in it, max would return 0."
Thanks again for the great article!