Skip to content

Instantly share code, notes, and snippets.

@soma-arc
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save soma-arc/e4bd22c0c205abeacaa9 to your computer and use it in GitHub Desktop.

Select an option

Save soma-arc/e4bd22c0c205abeacaa9 to your computer and use it in GitHub Desktop.
(defparameter chars (list "ムー" "チャ" "ッソ"))
(defun next (w)
(cdr (apply #'append (list w (list (nth (random (length chars)) chars))))))
(defun find-mu (w)
(if (string/= (apply #'concatenate 'string w) "ムーチャッソ")
(progn (princ (nth (1- (length w)) w))
(find-mu (next w)))
(princ (nth (1- (length w)) w))))
(defun start ()
(let ((w nil))
(dotimes (x (length chars))
(setf w (apply #'append (list w (list (nth (random (length chars)) chars))))))
(find-mu w)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment