Closed keyboard-k closed 8 years ago
No real reason why I wrote it like this except for clarity. The control flow is actually unambiguous in this case because we don't expect to receive negative numbers for the number of children - but of course the compiler doesn't know this.
I think your PR actually changes the behaviour of the algorithm to make it incorrect. You switch a >=
to a >
. I think the correct thing to do is to just add a return 0
at the end of the function.
Okay, doing it and checking it :smile: Hold on.
Alright done. :grin:
hmm... it does makes sense now .
Great - Thanks!
No, thank you for writing this amazing book ! :grinning: Everyone should read this and make their own lispy. It helps so much in understanding in other computer languages too.
Thanks! :+1:
Is there any specific reason for giving the example how you have given it before ?