Dave's answer is almost perfect: there is no check to see if low < high. I added a condition and now it works fine (otherwise it generates numbers from low to infinity):
range(Low, Low, High).
range(Out,Low,High) :- NewLow is Low+1, NewLow =< High, range(Out, NewLow, High).
Hope that helps!