Confusion with C++ interface and Prolog lists

The examples do a good job of explaining PREDICATE and unifying atoms and integers within those predicates. I am struggling to understand how to unify new Prolog lists within this context and there
are not a lot of examples using PlTerm_tail.

Suppose I want to write a C++ predicate that returns successive squares starting at integer N1 for N2 values. This would look something like
?- csquares(5,3,X).
X = [25, 36, 49].

What is the proper use of PLTerm_tail and unification strategy ?