I Have a list of [1,2,3,1,0] at start but need to split it into a number of sub lists where the new lists becomes [[1,2,3],[1],[0]].
The basic concept that I know in prolog is by comparing numbers.
ascending([Head | [HeadTail|TailTail]]) :- Head =< HeadTail.
we can do with basic list' pattern matching
test: