:- use_module(library(lists)). :- use_module(library(time)). % Is the new unification really fast? test(2^N-T) :- length(_,N), N > 17, BN is 2^N, length(L, BN), time(t(L)). t(L) :- unify_with_occurs_check(L,V), V \= [].