% if offset > 0: ← prev % else: ← prev % end | % if nelem >= max_per_page: next → % else: next → % end