Counting vowels in Lisp
Trying to get better in Lisp, I came across the following problem: (defun countVowels (string) (setf vowels (list ‘a 0 ‘e 0 ‘i 0 ‘o 0 ‘u 0)) (loop for ch across string when (member ch vowels) do (incf (getf vowels ch))) (format t “~{~a~^, ~}” vowels)) In my opinion, this counts every vowel by … Read more