<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fumiexcel</author_name>
  <author_url>https://blog.hatena.ne.jp/fumiexcel/</author_url>
  <blog_title>モナドとわたしとコモナド</blog_title>
  <blog_url>https://fumieval.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>CPS(Continuation passing style, 継続渡しスタイル)は、関数型プログラミングにおけるプログラムの書き方の一つである。CPSを導入する簡単な例をいくつか紹介しよう。 まず、入力された数値が3の倍数かどうかを判定するプログラムを作ってみよう。 foo :: IO Bool foo = do n &lt;- readLn :: IO Int return (n `mod` 3 == 0) ここで「CPS変換」なる儀式を行うと…こうなる！ foo' :: (Bool -&gt; IO r) -&gt; IO r foo' cont = do n &lt;- readLn :: IO Int co…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffumieval.hatenablog.com%2Fentry%2F2014%2F02%2F11%2F205916&quot; title=&quot;継続渡しなHaskellライフ - モナドとわたしとコモナド&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>2014-02-11 20:59:16</published>
  <title>継続渡しなHaskellライフ</title>
  <type>rich</type>
  <url>https://fumieval.hatenablog.com/entry/2014/02/11/205916</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
