<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inaz2</author_name>
  <author_url>https://blog.hatena.ne.jp/inaz2/</author_url>
  <blog_title>ももいろテクノロジー</blog_title>
  <blog_url>https://inaz2.hatenablog.com/</blog_url>
  <categories>
    <anon>Haskell</anon>
  </categories>
  <description>Haskellの練習として、catコマンドを実装してみる。 getConentsを使う もっとも簡潔な実装。 -- cat1.hs main = getContents &gt;&gt;= putStr do記法を使って書くと次のようになる。 main = do x &lt;- getContents putStr x 上のコードは下と同値である。 main = getContents &gt;&gt;= (\x -&gt; putStr x) ここで、&gt;&gt;=はいわゆるbind演算である。 (\x -&gt; putStr x)はputStrそのものなので、より簡潔な形に直すことで最初のコードになる。 実行結果。 $ runghc c…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finaz2.hatenablog.com%2Fentry%2F2015%2F01%2F10%2F195425&quot; title=&quot; catコマンドを実装してみる - ももいろテクノロジー&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>2015-01-10 19:54:25</published>
  <title> catコマンドを実装してみる</title>
  <type>rich</type>
  <url>https://inaz2.hatenablog.com/entry/2015/01/10/195425</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
