Skip to content

Commit 0d66394

Browse files
committed
Listing 20.8 rename handleCustomer.
1 parent 41f7c5a commit 0d66394

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/code-listings/lesson-20.fsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ let getCreditLimit customer =
6464
// Now you try #3
6565
type Customer = { Balance : int; Name : string }
6666

67-
let handleCustomer customers =
67+
let handleCustomers customers =
6868
match customers with
6969
| [] -> failwith "No customers supplied!"
7070
| [ customer ] -> printfn "Single customer, name is %s" customer.Name
7171
| [ first; second ] -> printfn "Two customers, balance = %d" (first.Balance + second.Balance)
7272
| customers -> printfn "Customers supplied: %d" customers.Length
7373

74-
handleCustomer [] // throws exception
75-
handleCustomer [ { Balance = 10; Name = "Joe" } ] // prints name
74+
handleCustomers [] // throws exception
75+
handleCustomers [ { Balance = 10; Name = "Joe" } ] // prints name
7676

7777
// Listing 20.9
7878
let getStatus customer =

0 commit comments

Comments
 (0)