MCPcopy
hub / github.com/bloomberg/memray / fib2

Function fib2

docs/examples/fibonacci/fib.py:11–15  ·  view source on GitHub ↗
(n, cache={0: 0, 1: 1})

Source from the content-addressed store, hash-verified

9
10
11def fib2(n, cache={0: 0, 1: 1}):
12 if n in cache:
13 return cache[n]
14 cache[n] = fib2(n - 1) + fib2(n - 2)
15 return cache[n]
16
17
18def run():

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…