I have searched for information on the net, regarding how to insert an element in the middle of a list in Prolog, but I have not found relevant information regarding what I want to do.
%Create_a_program_in_Prolog_that_inserts_an_element_in_the_half_of_a_list %insert_half([a,b,c,d,e,f],x,R). %R=[a,b,c,x,d,e,f].
I am new to using the Prolog program and learning its logic. Also, I'm honest, it's a university exercise and I don't know how to do it, thanks in advance