00001 package jpl.test;
00002
00003 import jpl.Query;
00004 import jpl.Term;
00005
00006 public class FetchLongList {
00007 public static void main(String[] args) {
00008
00009 Term t = (Term)((new Query("findall(foo(N,bar),between(1,2308,N),L)")).oneSolution().get("L"));
00010 int i = 0;
00011 while ( t.hasFunctor(".", 2)){
00012 t = t.arg(2);
00013 i = i+1;
00014 }
00015 System.err.println("got a list of " + i+" members");
00016 }
00017 }