a guest Dec 7th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defun distanta(ar father_stack dist nod)
  2.     (cond
  3.         ((eq (car ar) nod) dist)
  4.         ((= (car (cdr ar)) 2)(distanta (cdr (cdr ar)) (cons (+ dist 1) father_stack) (+ dist 1) nod))
  5.         ((= (car (cdr ar)) 1)(distanta (cdr (cdr ar)) father_stack (+ dist 1) nod))
  6.         ((= (car (cdr ar)) 0)(distanta (cdr (cdr ar)) (cdr father_stack) (car father_stack) nod))
  7.     )
  8. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand