I'm trying to learn prolog. I want to write in prolog a code for a general list of numbers. So far I have pick_numbers_general(List, N, NumList), where List is a general list (including nested ones), and N is a number.
The predicate succeeds if NumList is a list of the numbers in List, including those in nested lists, greater than N. The appearance order of the
numbers in Numlist is the same as that in L, so for instance, pick_numbers_general([g,h,1,[2,[n,3]],p],1,NumList) is true when NumList is [2,3].