Home My formal education Article list Prolog Prolog oddlength evenlength function

Prolog oddlength evenlength function

E-mail Print
Share/Save/Bookmark
%oddLength(List)
oddLength([_]).
oddLength([_,_|Rest]):-
oddLength(Rest).

%evenLength(List)
evenLength([_,_]).
evenLength([_,_|Rest]):-
evenLength(Rest).
Hits: 1375
Comments (0)Add Comment

Write comment

busy
Last Updated ( Wednesday, 27 August 2008 13:10 )  

Donate

Do you find content useful? Please donate so I can cover my hosting expenses! Thanks!