Task

Calculate the value of   e.



(e   is also known as   Euler's number   and   Napier's constant.)



See details: Calculating the value of e

func calculate_e(n=50) {
    sum(0..n, {|k| 1/k! })
}
 
say calculate_e()
say calculate_e(69).as_dec(100)