%By: Ryan Swenton %% % IncList takes a number var Start, and increases it by one a certain amount of times so that it is in the range given by the Var Range %% incList(_,0,[]). incList(Start,Range,[Start|T]):- R is Range-1, S is Start+1, incList(S,R,T). %% % DecList takes a number var Start, and decreases it by one a certain amount of times so that it is in the range given by the Var Range %% decList(_,0,[]). decList(Start,Range,[Start|T]):- R is Range-1, S is Start-1, decList(S,R,T). %% % AddList takes a number var Start, and adds it by variable Add a certain amount of times so that it is in the range given by the Var Range %% addList(_,0,_,[]). addList(Start,Range,Add,[Start|T]):- R is Range-1, S is Start+Add, addList(S,R,Add,T).