<?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>Haskell</anon>
  </categories>
  <description>「プログラミング Haskell 第７章 高階関数」の練習問題に unfold 関数が登場しています。 unfoldr は Data.List にも登録されていますので、どのような関数なのかやってみました。 foldはリストから値を求めますが、問題で作られている unfold 関数は初期値からリストを作る関数です。そして、引数として渡すのは次の３つの関数です。unfold (終了を判定する関数) (リストの要素を作る関数) (再帰に渡す値を作る関数) unfold p h t x | p x = [] |otherwise = h x : unfold p h t (t x) int2bin …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20111115%2F1321307810&quot; title=&quot;unfold 関数 - 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>2011-11-15 06:56:50</published>
  <title>unfold 関数</title>
  <type>rich</type>
  <url>https://sirocco.hatenadiary.org/entry/20111115/1321307810</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
