Change pagination example to invoke functions instead of passing to like T(template, args)