approximation of e with foldl