Toggle navigation
?
users online
Logout
Open hangout
Open chat for current file
conc1([],L,L). conc1([X|L1],L2,[X|L3]) :- conc1(L1,L2,L3). %sublist(S,L) :- conc(L1,L2,L),conc(S,L3,L2). shift(L1,L2) :-conc1([_|L1],[L1|_],L2). %last(Item,List) :-conc(_,[Item],List). evenlength( [ ] ). % smallest list with even length is [] (length=0) evenlength( [ _ | Tail ] ):- oddlength( Tail ). oddlength( [ _ ] ). % smallest list with odd length is [_] (length=1) oddlength( [ _ | Tail ] ) :- evenlength( Tail ). means(0,zero). means(1,one). means(2,two). means(3,three). means(4,four). means(5,five). means(6,six). means(7,seven). means(8,eight). means(9,nine). translateList([],[]). translateList([X|List],[What|ConvertedList]) :- means(X,What),translateList(List,ConvertedList). cutlast([_], []). cutlast([Head, Next|Tail], [Head|NTail]):- cutlast([Next|Tail], NTail). trim(L1,N,L2) :-conc1(L2,_,L1) ,length(L2,N).