To clarify what I mean, lets take this recursing example:
statement(). statement([A|B]):- A, statement(B).
The head, A is check by the rules my rules, and the tail B is sent to be recursed, which then becomes the head of level 2. When it recurses and is at the second level, how can I access the previous A? Am I thinking about it all wrong? If any clarification is needed please ask and I will do so. Thanks in advance.
What I am suppose to be testing for(type checker):
String s; int i; i = s.length(); // OK
String s; int i; s = i.length(); // fails