nlattessi

Seminario_TP3_EJ07

May 9th, 2012
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.31 KB | None | 0 0
  1. (defun vocales (l1 &optional (l2 '(a e i o u)))
  2.     (defun pertenece (atomo lista)
  3.         (if (null lista) nil
  4.             (if (eq atomo (car lista)) t
  5.                 (pertenece atomo (cdr lista))
  6.             )
  7.         )
  8.     )
  9.     (if (null l1) nil
  10.         (if (pertenece (car l1) l2)
  11.             (cons (car l1) (vocales (cdr l1)))
  12.             (vocales (cdr l1))
  13.         )
  14.     )
  15. )
Advertisement
Add Comment
Please, Sign In to add comment