# Closure strange behaviour

**URL:** <https://discourse.julialang.org/t/closure-strange-behaviour/53052>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [January 8, 2021, 4:54pm UTC](https://discourse.julialang.org/t/closure-strange-behaviour/53052 "2021-01-08T16:54:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [January 8, 2021, 4:59pm UTC](https://discourse.julialang.org/t/closure-strange-behaviour/53052/2 "2021-01-08T16:59:56Z")

</div>

See [Defining a function inside if...else..end NOT as expected?](https://discourse.julialang.org/t/defining-a-function-inside-if-else-end-not-as-expected/13815)

---

_[View the full topic](https://discourse.julialang.org/t/closure-strange-behaviour/53052)._
