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.

317529 (6) [Avatar] Offline
#1
I've been working through Lesson 6. I was able to follow the rules for recursion, and the introduction to pattern matching with no problems. The final paragraph of the lesson indicated that you can implement recursive functions with pattern matching, but when I tried to tackle the second exercise (rewriting the myGCD function using pattern matching), I realized that there was still a conceptual gap that I hadn't bridged.

I did eventually figure it out, but I was thinking it might be helpful to include after that last paragraph a code listing that demonstrates how to do myGCD with pattern matching, as a concrete example, rather than making it an exercise.

Then maybe for an exercise, you could create another simple recursive function to rewrite with pattern matching.

For me, at least, it probably would have helped me to bridge that gap faster.

Great book, by the way. Been learning a lot!
Will Kurt (21) [Avatar] Offline
#2
Thanks so much for your comment. There definitely is a bit of a cognitive leap for the myGCD w/ pattern matching question. One change which should help is there will soon (in one of the upcoming MEAP updates) should be answers to all the exercises (and spot quizzes). While these should help, I'll definitely take your advice and look at that section again.

Glad you're enjoying the book!