methods of foldl & foldr without init value