<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sirocco</author_name>
  <author_url>https://blog.hatena.ne.jp/sirocco/</author_url>
  <blog_title>sirocco の書いてもすぐに忘れるメモ</blog_title>
  <blog_url>https://sirocco.hatenadiary.org/</blog_url>
  <categories>
    <anon>Common Lisp</anon>
  </categories>
  <description>再帰を使うと美しく簡潔に解けることで有名な『ハノイの塔』を Common Lisp で塔の状態を表示しながら解いてみます。 ;; 三つある塔それぞれを表現します。 ;; 三つの塔を作ります。 ;; 塔&quot;A&quot;の重ねてあるリングを塔&quot;B&quot;に移動したい。 (setq tower-a '(&quot;A&quot; (1 2 3 4))) (setq tower-b '(&quot;B&quot; ())) (setq tower-c '(&quot;C&quot; ())) ;; 塔の状態を表示する関数 (defun show-tw (tower) (format t &quot;~A:~A~%&quot; (car tower) (reverse (cadr tower)))…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20100823%2F1282563554&quot; title=&quot;Common Lisp でハノイの塔を解いてみる。 - sirocco の書いてもすぐに忘れるメモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-08-23 20:39:14</published>
  <title>Common Lisp でハノイの塔を解いてみる。</title>
  <type>rich</type>
  <url>https://sirocco.hatenadiary.org/entry/20100823/1282563554</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
