I'm using Jinja 2.8 templating engine. I'm trying to write a template which will walk over a tree structure and output information from that tree. To do this I'm trying to use a macro which calls itself which doesn't seem to work.

This simple recursive macro also doesn't work:

```
{% macro factorial(n) %}
  {% if n > 1 %}
    {{ n }} * {{ factorial(n-1) }}
  {% endif %}
{% endmacro %}

{{ factorial(3) }}

```

When run following error is raised on the third line of Jinja code.

```
UndefinedError: 'factorial' is undefined

```

Does Jinja support recursive macros? How else could a nested data-structure be traversed in Jinja?