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.

likethesky (14) [Avatar] Offline
Not sure if you consider this to be an errata on p. 47 (pbook) or not... but you give an example of closing over the host argument and name the function that does that 'exampleUrlBuilder' (Listing 5.3), but then when giving an example--quoting from the book--you say (right above Listing 5.4), "This time, you'll have to pass both your exampleUrlBuilder function and your apiKey to your generator." However, in Listing 5.4, you don't use 'exampleUrlBuilder' but instead use 'hostBuilder' ...

Did you mean to use exampleUrlBuilder instead?

TBH, I think I prefer the name hostBuilder, so maybe you want to rename all of the two paragraphs above (from Listing 5.3 onwards) to say hostBuilder instead of exampleUrlBuilder... or maybe a 3rd option:
instead of either of those?? In any case, it seems that they should probably be consistent, perhaps? It did confuse this particular n00b... Btw, you also use exampleUrlBuilder in Listing 5.5 as well, so you'd need to change that instance as well, if you do change it. smilie

Also--minor nit--but since this is code, in Listing 5.2 you use getRequestURL even though the title / subhead Listing 5.2 uses ...Url, not ...URL, then on the GHCi> line below you also use getRequestURL, but in Figure 5.4, you instead use getRequestUrl, not getRequestURL, so those two code snippets won't work if typed in, of course. Also--another minor nit--in Figure 5.4 you should capitalize the 'K' in apikey, so it reads apiKey ... again, if you want the code to work as written, if typed in.