<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>guyon</author_name>
  <author_url>https://blog.hatena.ne.jp/guyon/</author_url>
  <blog_title>Guyon Diary</blog_title>
  <blog_url>https://guyon.hatenablog.jp/</blog_url>
  <categories>
    <anon>scheme</anon>
  </categories>
  <description>max-numをリファクリングの例があったので、要点をメモ。 ;; リストから最大値を表示する手続き (define (max-num lis) ;; 大きい数値を返す手続き (define (pick-greater a b) (if (&gt; a b) a b)) (fold pick-greater -inf.0 lis)) (print (max-num '(4 3 5 2))) この手続きの特徴は、負の無限大「-inf.0」を初期値としてリストと比較して実現している。 リファクタリングは負の無限大ではなくcarとcdrだけで実現してみようというもの。まずはコードから ;; リストから最大…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fguyon.hatenablog.jp%2Fentry%2F20080526%2F1211804216&quot; title=&quot;max-num手続きのリファクタリング - Guyon Diary&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>2008-05-26 21:16:56</published>
  <title>max-num手続きのリファクタリング</title>
  <type>rich</type>
  <url>https://guyon.hatenablog.jp/entry/20080526/1211804216</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
