You are on page 1of 1

(define lista-factoriales

(lambda (n)
(letrec
(
(factorial (lambda (x)
(if (= x 0) 1 (* x (factorial (- x 1))))
)
)

(lista-factorial-aux
(lambda (n acc)
(if
(= n acc)
(list (factorial n))
(cons (factorial acc) (lista-factorial-aux n (+ acc 1)))
)
)
)
)
(lista-factorial-aux n 0)
)))

You might also like