CLP dialect :ISO PrologGNU PrologSicstus PrologOther (file)
Program to type check (below or local file) max([],0). max([X|L],M) :- max(L,M2), ( X > M2 -> M=X ; M=M2). profondeur(X,1) :- var(X),!. profondeur(T,P) :- T =.. [ _ | Args ], profondeur_liste(Args,Profondeurs), max(Profondeurs, P1), P is P1+1. profondeur_liste([],[]). profondeur_liste([T|L],[P|R]) :- profondeur(T,P), profondeur_liste(L,R).
Optional type declarations (below or local file)