nth in latest unstable version

Jasper Taylor <[email protected]> Fri, 04 Dec 2009 16:52:13 +0000
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
nth and nth0 do not work when the position is a number but the list is 
free. Examples (on Ubuntu but MacOS is same I think):

jaspert@spacehopper:~$ gprolog
GNU Prolog 1.3.2
By Daniel Diaz
Copyright (C) 1999-2009 Daniel Diaz
| ?- nth(1,B,c).

no
| ?- nth0(0,B,c).

no

Working examples:

| ?- nth(A,B,c).

A = 1
B = [c|_] ? ;

A = 2
B = [_,c|_] ? ;

A = 3
B = [_,_,c|_] ?

yes
| ?- nth0(A,B,c).

A = 0
B = [c|_] ?

yes

Cheers
    --Jasper