Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (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)
- )))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement