I can't make any sense out of this: If I give prolog reverse([], A).
it works fine, if I give it reverse(A, []).
and answer ;
on first suggestion it hangs!
Why? (Same result for both gnuprolog and sicstus prolog!)
aioobe@r60:~$ prolog
GNU Prolog 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
| ?- reverse([], A).
A = []
yes
| ?- reverse(A, []).
A = [] ? ;
Fatal Error: global stack overflow (size: 32768 Kb,
environment variable used: GLOBALSZ)
aioobe@r60:~$