USING COND
(defun my-length (list1)
(cond ( (null list1) 0 )
(t (+ 1 (my-length (cdr list1)) ))
)
)
USING IF
(defun my-length (list1)
( if (null list1) 0 (+ 1 (my-length (cdr list1))) )
)
(defun my-length (list1)
(cond ( (null list1) 0 )
(t (+ 1 (my-length (cdr list1)) ))
)
)
USING IF
(defun my-length (list1)
( if (null list1) 0 (+ 1 (my-length (cdr list1))) )
)
Comments
Post a Comment