How do I get a function to keep what it returns as it's "referance" instead of it's value? Or some other logical method that lets you perform getting/setting without having to write lots of messy functions?
I'm also curious if there are anything around like practice sets. That give you a problem then also show an example. This tends to be the fastest way for me to learn since every language has little short cuts that aren't obvious till you see it your way and then someone else's.
Before explaining how to pass into a user defined function by reference, let me re-define 'player-states' by making it strictly a list of nested associations:
Thanks for the help, I'll look at it in detail as soon as possible.
I'll also have to do some more reading from the looks of it. don't quite know what the ':' does except that it's used for controlling name spaces when using objects. The use in the last example seems weird to me, and I'm not sure I know what a functor is(or at least by that name).
Didn't even realize I mixed up the parens on the original play-states list. Which explains why lookup was being wierd when I tried to do it that way originally.