From a296d359b0dc0bac4ba33ebcd2e4a2aad717b09a Mon Sep 17 00:00:00 2001 From: fzzkyd Date: Tue, 12 Feb 2019 00:16:26 +0800 Subject: [PATCH] Fix typo --- src/ch10-00-generics.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ch10-00-generics.md b/src/ch10-00-generics.md index 3c5272322..a928b81e7 100644 --- a/src/ch10-00-generics.md +++ b/src/ch10-00-generics.md @@ -64,10 +64,10 @@ This code stores a list of integers in the variable `number_list` and places the first number in the list in a variable named `largest`. Then it iterates through all the numbers in the list, and if the current number is greater than the number stored in `largest`, it replaces the number in that variable. -However, if the current number is less than the largest number seen so far, the -variable doesn’t change, and the code moves on to the next number in the list. -After considering all the numbers in the list, `largest` should hold the -largest number, which in this case is 100. +However, if the current number is less than or equal to the largest number seen +so far, the variable doesn’t change, and the code moves on to the next number +in the list. After considering all the numbers in the list, `largest` should +hold the largest number, which in this case is 100. To find the largest number in two different lists of numbers, we can duplicate the code in Listing 10-1 and use the same logic at two different places in the