(fn, *args)
| 161 | |
| 162 | |
| 163 | def cached_fn(fn, *args): |
| 164 | global memory |
| 165 | if args in memory: |
| 166 | return memory[args] |
| 167 | else: |
| 168 | result = fn(*args) |
| 169 | memory[args] = result |
| 170 | return result |
| 171 | |
| 172 | |
| 173 | def ncr(n, r): |
no outgoing calls
no test coverage detected