I know we have a function to count number of items in a list, however in this procedure I am can not use this function. So how can I count number of elements in a list.
(define (last_element l count )
(+ count 2)
(if (null? cdr l)
done
(last_element (cdr l) count)))
(last_element (list 1 2 3 4 5) 0)