Toggle navigation
?
users online
Logout
Open hangout
Open chat for current file
/** <examples> ?- member(N, [-2,-1,0,1]), pp(N, T, PP), format("N=~w~nT=~w~nPP=~w~n~n", [N,T,PP]), fail ; true. */ pp(N, T, PP) :- E = I+1/J, I0 = -2, IN is N + 1, J0 = 2, JN is N + 3, findall( FF, ( between(I0, IN, I), between(J0, JN, J), term_to_atom(E, F), atomic_list_concat(['(', F, ')'], FF) ), Fs0), (Fs0 = [] -> Fs = [1] ; Fs = Fs0 ), atomic_list_concat(Fs, '*', A), term_to_atom(T, A), PP is T.