The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

octavio08 (8) [Avatar] Offline
#1
The code doesn’t compile.

1.-

let smaller, larger = List.partition (fun number -> number> firstElement) restofArray

should be:

let smaller, larger = List.partition (fun number -> number> firstElement) restOfArray

2.-

quicksortSequential smaller @ number :: quicksortSequential larger

should be:

quicksortSequential smaller @ firstElement :: quicksortSequential larger


Similar errors in Listing 1.2 and Listing 1.3

Additionally, in Listing 1.3:

quicksortParallelWithDepth depth smaller
quicksortParallelWithDepth depth larger

I think it should be:

quicksortParallelWithDepth depth smaller @ firstElement :: quicksortParallelWithDepth depth larger


Riccardo Terrell (31) [Avatar] Offline
#2
Thanks for the catch!
Something got lost porting the code to the text editor, which have introduced some typos.
like restofArray and restOfArray.

Regarding code listing 1.3 you are correct, the line got broken due to code annotation #C (I think).
In fact, I noticed that the `restOfArray` is broken into `restof Array`

Ultimately, these code annotation will be printed differently without impacting the code.

I will apply the corrections
Thank you