ThatGuyDuncan (68) [Avatar] Offline
#1
When I copy code (in this case, Listing 6.7), the numbers come with. Is it possible to wrap them in comments so we, your faithful readers, don't have to edit them out before sending the code to the REPL?

let drive(petrol, distance) = ? 
    if distance = "far" then petrol / 2.0
    elif distance = "medium" then petrol - 10.0
    else petrol - 1.0

becomes

let drive(petrol, distance) = (*?*)
if distance = "far" then petrol / 2.0
elif distance = "medium" then petrol - 10.0
else petrol - 1.0

One other thing -- when I copy the code, any trailing spaces (there's one after the "?" character) seem to confuse my compiler. I actually have to test each line to ensure no trailing spaces and delete whatever I find. Is that just me?
Isaac Abraham (68) [Avatar] Offline
#2
Use the git repo (or samples bundled with the MEAP) for the code sample - they should contain all the listings in a ready to go fashion.
ThatGuyDuncan (68) [Avatar] Offline
#3
Forgive me -- where do I find the link? I searched "git" in the book and did not find it.
Isaac Abraham (68) [Avatar] Offline
#4
https://github.com/isaacabraham/learnfsharp

I'll have this added as a note for the next MEAP so this doesn't fall through the cracks.