nlattessi

Seminario_TP4_EJ05

May 23rd, 2012
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.44 KB | None | 0 0
  1. (defun misma-forma (l1 l2)
  2.     (cond       ((null l1)
  3.                 (if (null l2)
  4.                     t
  5.                     nil
  6.                 )
  7.             )
  8.             ((null l2)
  9.                 (if (null l1)
  10.                     t
  11.                     nil
  12.                 )
  13.             )
  14.             ((atom (car l1))
  15.                 (if (atom (car l2))
  16.                     (misma-forma (cdr l1) (cdr l2))
  17.                     nil
  18.                 )
  19.             )
  20.             ((listp (car l1))
  21.                 (if (listp (car l2))
  22.                     (if (misma-forma (car l1) (car l2))
  23.                         (misma-forma (cdr l1) (cdr l2))
  24.                         nil
  25.                     )
  26.                     nil
  27.                 )
  28.             )
  29.     )
  30. )
Advertisement
Add Comment
Please, Sign In to add comment