<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bleis-tift</author_name>
  <author_url>https://blog.hatena.ne.jp/bleis-tift/</author_url>
  <blog_title>ぐるぐる～</blog_title>
  <blog_url>https://bleis-tift.hatenablog.com/</blog_url>
  <categories>
    <anon>Scala</anon>
  </categories>
  <description>Scala では if は文じゃなくて式なので、値を持つ。 じゃぁ else がなかったらどうなんの？ってことで試してみた。 scala&gt; if (true) 1 scala&gt; ・・・えーっと？ scala&gt; val res = if (true) 1 scala&gt; res scala&gt; println(res) () ・・・Unit を返すらしい。もうちょっと親切な出力が欲しいです・・・ で、次に気になったのが else if の扱い。 scala&gt; println(if (true) 1 else if (true) 2) 1 scala&gt; え、マジで？ else if には else な…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbleis-tift.hatenablog.com%2Fentry%2F20091110%2F1257834883&quot; title=&quot;if 式 - ぐるぐる～&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>2009-11-10 15:34:43</published>
  <title>if 式</title>
  <type>rich</type>
  <url>https://bleis-tift.hatenablog.com/entry/20091110/1257834883</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
