You either need to use foldr to defer the multiply-and-add until the end of the list is processed, or reverse the list before processing it.