I am going to split list into two list - by positions (odd or even), for example (of course it is not exact example, given way of working prolog).
[1,2,3,4,5]
[1,3,5]
[2,4]
div([H1|[]], [H1], []).
div([H1,H12|T1], [H2|T2], [H3|T3]) :- div(T1, T2, T3).
Warning:
Singleton variables: [H1,H12,H2,H3]
I have no idea how to implement it to avoid this warning - have you some idea ?