<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Naotsugu</author_name>
  <author_url>https://blog.hatena.ne.jp/Naotsugu/</author_url>
  <blog_title>A Memorandum</blog_title>
  <blog_url>https://blog1.mammb.com/</blog_url>
  <categories>
    <anon>Haskell</anon>
  </categories>
  <description>blog1.mammb.com からの続きです。 条件式 Haskell の if 文は、多くの関数型言語と同じく式です。つまり、なんらかの値を返します。そして else 部がかならず必要です。 整数の絶対値を返却する関数は、条件式を使って以下のように定義できます。 abs :: Int -&gt; Int abs n = if n &gt;= 0 then n else -n 実行結果は以下のようになります。 Main&gt; abs 1 1 Main&gt; abs (-4) 4条件式はネストすることもできます。例えば以下のように signum n if n &lt; 0 then -1 else if n == 0 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog1.mammb.com%2Fentry%2F20110719%2F1311091230&quot; title=&quot;は は ハ ハ haskell - A Memorandum&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-07-19 01:00:30</published>
  <title>は は ハ ハ haskell</title>
  <type>rich</type>
  <url>https://blog1.mammb.com/entry/20110719/1311091230</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
