Re: Binary Calculator



Hi Bill,

student wrote:


processor(LastInstr,[],CurrState,FinalState) :-
interpret(LastInstr,CurrState,FinalState).
processor(CurrInstr,[NextInstr|RemInstrs],CurrState,FinalState) :-

Exchanging the leftmost two arguments helps for systems with first argument indexing only. Why do you now also include process([], nil)?

All the best,
Markus.
.