文字列の母音、子音、その他の記号をそれぞれ 0 の C、V に変更するプログラムを作成する必要があります。入力をいただければ幸いです。
(defun string-to-list (string)
(loop for char across string collect char))
(defun is-vowel (char) (find char "aeiou" :test #'char-equal))
(defun is-consonant (char) (find char "bcdfghjklmnpqrstvwxyz" :test #'char-equal))
(defun letter-type (char)
(if (is-vowel char) "V"
(if (is-consonant char) "C"
"0")))
(defun analyze-word (word-string)
(loop for char across word-string collect (letter-type char)))
また、文字列にしたいのですが、どうすればいいですか?リストを繰り返し処理して文字列にする関数を定義する必要がありますか、それとも簡単な方法ですか?