# Type instability of nested recursive function

**URL:** <https://discourse.julialang.org/t/type-instability-of-nested-recursive-function/78392>\
**Category:** Performance\
**Tags:** type-stability\
**Created:** [March 24, 2022, 1:53pm UTC](https://discourse.julialang.org/t/type-instability-of-nested-recursive-function/78392 "2022-03-24T13:53:58Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ma-chengyuan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ma-chengyuan/32/34860_2.png) [@ma-chengyuan](https://discourse.julialang.org/u/ma-chengyuan)\
**Post date:** [March 24, 2022, 3:24pm UTC](https://discourse.julialang.org/t/type-instability-of-nested-recursive-function/78392/3 "2022-03-24T15:24:08Z")

</div>

Thanks! This approach does work, but the actual `g` in my code uses 5 bindings from the outer function, so moving the inner function outsides would add a lot of arguments.

---

_[View the full topic](https://discourse.julialang.org/t/type-instability-of-nested-recursive-function/78392)._
