# Evaluation of e^x with series expansion

My code calculates $e^x$ with series expansion. Is there any way to make it shorter and cleaner?

#lang racket
; evaluate e^x with series expansion, use first 10 terms.

(define (exp x)
(letrec ([f1 (lambda (n cx cn)
;(writeln (list n cx cn))
(if (>= n 10)
0
(+ (/ cx cn) (f1 (+ n 1) (* cx x) (* cn (+ n 1))))))])
(+ 1 (f1 1 x 1))
)
)

[rd (lambda (n)
(unless (zero? n)
(writeln (exp x)) (rd (- n 1))))])
(rd N))


## General Programming

1. Using built the built in exponent function from racket/base and referencing Euler's Number from math/base would probably reduce the likelihood of bugs; increase speed; and allow programming at a higher level of abstraction.

2. An alternative to read is the GUI function get-text-from-user in racket/gui/base.

## Example Code

#lang racket

(require (only-in math/base
euler.0)
(only-in racket/gui/base
get-text-from-user))

(define (get-power-of-e)
(define x (string->number
(get-text-from-user "Power of e"
"provide exponent")))
(expt euler.0 x))