<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tanakaBox</author_name>
  <author_url>https://blog.hatena.ne.jp/tanakaBox/</author_url>
  <blog_title>ボクノス</blog_title>
  <blog_url>https://boxnos.hatenablog.com/</blog_url>
  <categories>
    <anon>Scheme</anon>
  </categories>
  <description>Schemeは括弧の中を先に計算するのかと思っていたが、どうやら違う。Schemeの評価順序を調べてみた。 実験 まずはC言語で。 int i = 1; printf(&quot;%d&quot;, i + ((i = 5), 2)); // 7 絶対使わなそうな書き方だけど、C言語では括弧の中が先に評価されるから、括弧の中で代入文を使うとiの値は5に変わる。i + 2をすると答えは7だ。 次にSchemeを見てみる。 (define i 1) (define (test1) (+ i (begin (set! i 5) 2))) (test1) ; 3 (test1) ; 7 １回目の評価と、2回目の評価の結果…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fboxnos.hatenablog.com%2Fentry%2F20071028%2F1193548045&quot; title=&quot; Schemeの評価順序 - ボクノス&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>2007-10-28 14:07:25</published>
  <title> Schemeの評価順序</title>
  <type>rich</type>
  <url>https://boxnos.hatenablog.com/entry/20071028/1193548045</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
