<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shigemk2</author_name>
  <author_url>https://blog.hatena.ne.jp/shigemk2/</author_url>
  <blog_title>by shigemk2</blog_title>
  <blog_url>https://www.shigemk2.com/</blog_url>
  <categories>
    <anon>Haskell</anon>
  </categories>
  <description>Haskellには、畳み込み(fold)という機能があるの。畳み込みを使うと、データ構造(たとえばリスト)を単一の値に纏めることができる。 畳み込み関数は2つの引数を取る関数であり、畳み込みに用いる値(アキュムレータ)の初期値、畳み込むリストを受けとる。リストを走査して何かを返したいときは、畳み込みを使えばよいでせう。 ちなみにリストの走査は右からでも左からでも出来るよ。2つのリストの値を計算して、その結果をアキュムレータとする…という再帰っぽい操作を繰り返し、最後のアキュムレータの 値を関数は返してくれるんDA -- アキュムレータ sum' :: (Num a) =&gt; [a] -&gt; a s…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shigemk2.com%2Fentry%2F20120825%2F1345870646&quot; title=&quot;畳み込み - by shigemk2&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>2012-08-25 13:57:26</published>
  <title>畳み込み</title>
  <type>rich</type>
  <url>https://www.shigemk2.com/entry/20120825/1345870646</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
