Advertisement
Valemmil

Second program in LisP

Sep 15th, 2023 (edited)
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.17 KB | Source Code | 0 0
  1. (defun fullength (x)
  2.     (cond
  3.         ((null x) 0)
  4.         ((atom x) 1)
  5.         (t (+ (fullength (car x)) (fullength (cdr x))))
  6.     )
  7. )
  8.  
  9. (print (fullength `(1 2 3 4 5 3)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement