Agents
Learn how to make Fibonacci code efficient with the help of the Agent module.
We'll cover the following...
We'll cover the following...
Our Fibonacci code is really inefficient. To calculate fib(5)
, we calculate this:
Make Fibonacci code efficient
Look at all that duplication. If only we could cache the intermediate values. As we know, Elixir modules are basically buckets of ...