recursive fib func with memoization *ONE LINER* (1 line series)[no4]
This is my implementation of the fibonacci function using recursion and memoization in one line!
if you wanna learn how it works and what memoization/recursion is check out this post i made which covers that and more!
I struggled with this one liner mainly because of how memoization requires a global variable, in this case a dict called cache, but it came together in the end.
let me know if you have an idea for what i should attempt to make in one line next :)
JacobMcPherson1 (102)
I'm in middle school so I don't understand all of these big words
rafrafraf (1369)
@JacobMcPherson1 lmao thats fine this is some high level stuff way beyond middle school! id be surprised if ya did :)
FlaminHotValdez (366)
abuse ze lambda v4.
Wow! Nice job continuing on with the one liner! XD :D
@JBYT27 lmaoo thank you!
np! @rafrafraf