Skip to content

Commit 7d00271

Browse files
committed
Fix Lesson 36 listing numbers.
1 parent 75625fa commit 7d00271

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/code-listings/lesson-36.fsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ let asyncLength =
3737

3838
asyncLength |> Async.RunSynchronously
3939

40-
// Listing 36.5
40+
// Listing 36.4
4141
let getTextAsync = async { return "HELLO" }
4242
let printHelloWorld =
4343
async {
@@ -46,7 +46,7 @@ let printHelloWorld =
4646

4747
printHelloWorld |> Async.Start
4848

49-
// Listing 36.6
49+
// Listing 36.5
5050
let random = System.Random()
5151
let pickANumberAsync =
5252
async { return random.Next(10) }
@@ -59,7 +59,7 @@ let createFiftyNumbers =
5959

6060
createFiftyNumbers |> Async.Start
6161

62-
// Listing 36.7
62+
// Listing 36.6
6363
let urls = [| "http://www.fsharp.org"; "http://microsoft.com"; "http://fsharpforfunandprofit.com" |]
6464
let downloadData url = async {
6565
use wc = new System.Net.WebClient()
@@ -75,7 +75,7 @@ let downloadedBytes =
7575

7676
printfn "You downloaded %d characters" (Array.sum downloadedBytes)
7777

78-
// Listing 36.8
78+
// Listing 36.7
7979
let downloadData url = async {
8080
use wc = new System.Net.WebClient()
8181
printfn "Downloading data on thread %d" System.Threading.Thread.CurrentThread.ManagedThreadId
@@ -90,7 +90,7 @@ let downloadedBytes =
9090

9191
printfn "You downloaded %d characters" (Array.sum downloadedBytes.Result)
9292

93-
// Listing 36.9
93+
// Bonus - custom computation expression!
9494
type Maybe() =
9595
member __.Bind(opt, func) = opt |> Option.bind func
9696
member __.Return v = Some v

0 commit comments

Comments
 (0)