# I don't understand why this code is not working

**URL:** <https://discourse.julialang.org/t/i-dont-understand-why-this-code-is-not-working/37524>\
**Category:** New to Julia\
**Created:** [April 13, 2020, 6:10pm UTC](https://discourse.julialang.org/t/i-dont-understand-why-this-code-is-not-working/37524 "2020-04-13T18:10:28Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [April 13, 2020, 6:49pm UTC](https://discourse.julialang.org/t/i-dont-understand-why-this-code-is-not-working/37524/4 "2020-04-13T18:49:04Z")

</div>

Hi @Nimpa, welcome! Looks like you already started a topic for this — let’s try to keep things consolidated there.

> [@Why is this code not working?](https://discourse.julialang.org/t/why-is-this-code-not-working/37523):
>
> The function below is to calculate the fibonacci sequence using get! but i don’t understand why it is not working. global fib\_cache = Dict{BigInt, BigInt}(0 =\> 0, 1 =\> 1) function fib(n::Integer) global fib\_cache get!(fib\_cache, BigInt(n), fib(n‑1) + fib(n‑2)) end

---

_[View the full topic](https://discourse.julialang.org/t/i-dont-understand-why-this-code-is-not-working/37524)._
