I want to take a value, such as 3 and return all from the given value to one. For example, if I passed in count(3), I would get 3,2, 1 separately. I don't want to return the values as a list. For what I wrote I tried to first return a value and then recursively call the next value to return. This however only returns once. What am I doing wrong?
count(0,1).
count(N,F) :-
N1 is N-1,
F is N-1,
count(N1,F1).