I writing a predicate in prolog in which I give two parameters listsFromL(X,B). X would be a list with lists within that list and B would be a new list with the lists from X.
So, for example, if I would call listsFromL([1,2,[d,a]],X). the return would be B = [[d,a]]. and if I would add more lists to X I would get a longer list with lists as X.
How do I go about this?