fork download
  1. (defun count(x)
  2. (cond ((null x) 0)
  3. ((atom x)1)
  4. (t (+ (count (car x))
  5. (count (cdr x))))))
  6.  
  7. (write (count'((1 2)3)))
Success #stdin #stdout #stderr 0.02s 10308KB
stdin
Standard input is empty
stdout
3
stderr
WARNING: DEFUN/DEFMACRO(COUNT): #<PACKAGE COMMON-LISP> is locked
         Ignore the lock and proceed
WARNING: DEFUN/DEFMACRO: redefining function COUNT in /home/JGeBra/prog.lisp,
         was defined in C