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.

Andreas Reuleaux (7) [Avatar] Offline
in the final listing 4.19 parseCommand takes a list of String

parseCommand: List String -> Maybe Command

whereas on the pages before it was explained to be of type:

parseCommand : String -> String -> Maybe Command.

Consequently the function parse (that calls parseCommand) is
different as well:

* in the final listing it's body is just:
parseCommand (words input)

* whereas on page 131 it was explained as:
case span (/= ' ') input of
(cmd, args) => parseCommand (ltrim args)

I assume the final listing should be in line with the explanations before,
or otherwise these further changes (simplifications) should be
Edwin Brady (66) [Avatar] Offline
I think I've edited this program a bit and the listings have gone out of sync. I'll correct it, thanks.