Functional programming books give lots of trivial but supposedly neat mathematical examples because that’s all functional programming languages can sensibly do.
Quite.
I think Jakub said it best already, but at that point in the book, state and side effects are not introduced yet (If I’m correct about where you are). You can’t do a setf and what it means doesn’t make sense in the substitution model so if you only have the knowledge that they present about how the computer computes things, you can’t even work out what the second example would do.
If you augment the substitution model to allow for this you’d end up with something that looks exactly like the first method, wear you have a variable changing over time in the same call stack. I probably didn’t explain it perfectly but the book doesn’t go out to teach you the quickest way to solve things. You’re trying to solve the problems with much more knowledge and experience then the book wants you to have at this point.
Name:
Anonymous2009-03-06 10:17
The array bounds of all strings indeed all arrays for.
Name:
Anonymous2009-03-06 12:51
The angle of objects I think The goto Monad is a monad whatever you call the garbage collector things are going very.