<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>h_sakurai</author_name>
  <author_url>https://blog.hatena.ne.jp/h_sakurai/</author_url>
  <blog_title>Scala で TAPLを勉強しつつ LLVM コンパイラを作る日記</blog_title>
  <blog_url>https://h-sakurai.hatenadiary.org/</blog_url>
  <categories>
    <anon>haxe</anon>
  </categories>
  <description>関数がクロージャになるように変更 みなさんは、クロージャってご存知でしょうか？ 正確に説明となると難しいですが、簡単にいうと親の関数の環境も参照できる関数をクロージャといいます。 親の親の関数の環境も、親の親の親の関数の環境も、と祖先の環境を参照できる関数といったほうがいいのでしょうか？ ま、そんなやつです。 今回は、環境を持った関数を作成します。 co=fun(a){fun(b){a=a+b}} c=co(0)println(c(1))println(c(1))c(1)というプログラムを実現します。 このcoという関数は関数を返す関数です。 coが返す関数は内部にa変数を持った状態で帰ります…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fh-sakurai.hatenadiary.org%2Fentry%2F20090906%2Fp1&quot; title=&quot;haXeで作るプログラミング言語(12) - Scala で TAPLを勉強しつつ LLVM コンパイラを作る日記&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>2009-09-06 00:00:00</published>
  <title>haXeで作るプログラミング言語(12)</title>
  <type>rich</type>
  <url>https://h-sakurai.hatenadiary.org/entry/20090906/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
