Generate list - geometric progression
问题 I'd like to generate a geometric progression list using a predicate with 4 parameters - the list where the progression will be generated, the length of this list, the start element, and the multiplier of the progression. What I've done so far is having only a 3-parameter predicate to generate the geometric progression without stopping : gengeom([X],X,_). gengeom([H|Tail],H,Q):-X is H*Q,gengeom(Tail,X,Q). And this query gives me all progressions with start element 1 and multiplier 2 : ?