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.

Ryan Riley (17) [Avatar] Offline
Not sure how you got 120, but the result of [ 1 .. 5 ] |> List.fold (*) 5 is 600 every way I tried it. Also, and I'm sure you know this, fold_left is now fold in the latest version of F#.
Tomas Petricek (160) [Avatar] Offline
Re: 6.7.3, Page 170, Incorrect return value
thanks for reporting this - you're right the listing is wrong. I wanted to write the folding with 1 as the initial value (I'm not sure how "5" appeared there):

>> [ 1 .. 5 ] |> List.fold (*) 1

Regarding fold_left - yes, that's deprecated with F# "beta 1". I'm just updating all the source code for this version, so this is corrected in the manuscript now.

Thanks (and thanks for your other posts too - I'll eventually get to all of them).