added fold, filter functions
solved 7th, 8th problems; adding demo for memoization