このディレクトリの索引
#  I have problem with my prolog code. I need reverse all atomic elements of list.
#  
#  Example: [1,2,[3,4]] -> [[4,3],2,1]
#  
#  My solution:
#  
#  myReverse([], []).
#  myReverse([H|T], X) :- myReverse(T, RT), myAppend(RT, H, X).
#  But it only give me: [[3,4],2,1] I think, i need use is_list function and recursive call list if it's not atomic... but my prograss is stucked... can u guys know how to write it?

myreverse(L1,L2) :-
        myreverse(L1,[],L2).

myreverse([],L,L).
myreverse([[A|R0]|R1],L2,L) :-
        myreverse([A|R0],L3),
        myreverse(R1,[L3|L2],L).
myreverse([A|R1],L2,L) :-
        myreverse(R1,[A|L2],L).