i want to write a function that accepts two lists of predicates functions and elements list and returns all the members in the original list that hold all the predicates in pre1_list and delete the members in the original list that unhold all the predicates in pre2_list
i am writing this code in a language called mini lisp , it's similar to lisp but more simple ,but that doesn't matter , i just want help on how to do such a thing ? an idea of how to implement such code !
how i am thinking to do it : (just the beginning of my idea)
(defun get_pred_1_not_2 (pre1_list pre2_list list)
(cond
((null list) NIL)
; return all the members in the original list that hold all the predicates in pre1_list
(pre1_list (get_pred_1_not_2 (cdr pre1_list) pre2_list (filter_pre list (car pre1_list))))
; delete all the members in the original list that unhold all the predicates in pre2_list
(pre2_list (get_pred_1_not_2 pre1_list (cdr pre2_list) ;.... (
where filter_pre
is a function that returns all the element from the list that holds predications giving to it
i hope someone could help ! as this function is really deficult to write and i don't want to just give up thank you