Add CT331 Programming Paradigms

This commit is contained in:
2023-12-07 01:33:53 +00:00
parent 38a012c323
commit 262614ce83
207 changed files with 4516 additions and 0 deletions

View File

@ -0,0 +1,5 @@
% base case: any element is not in an empty list
isNotElementInList(_, []).
% return true if Element is not the Head of the list and it's not found recursively searching the rest of the list
isNotElementInList(Element, [Head | Tail]) :- Element \= Head, isNotElementInList(Element, Tail).