Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And SICP quits at this point? What if "previously-computed-result" is false, because f computes boolean values? This is just an 80% solution, which works for "fib".


The implementation of tables that he uses isn't actually reasonable for most use. If actually implementing memoization, one would probably use SFRI-44 style maps, which come with a 'contains-key' function that solves this problem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: