I went through my books and I have googled until I have run out of searches, but I still cannot find an example or answer to this problem:
The following code does not compile because the Effect type and Affect type were not declared during the declaration of Entity. Therefore, I do not understand how this can be circumvented.
In C ++, this problem is solved by declaring the prototype in h files, and then includes the h file. In C #, this is never a problem. So how is this allowed in F #?
The main goal here is that an entity of type Entity should be able to enumerate Affects, which it can apply to Type Entity entities. An entity can also list the effects that have been applied to it. Thus, the "current" state of the object is detected by adding all the effects against the initial state of the object.
Thank you for your time,
- Adam Lenda
f # mutual-recursion
Adam lenda
source share