<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nkgt_chkonk</author_name>
  <author_url>https://blog.hatena.ne.jp/nkgt_chkonk/</author_url>
  <blog_title>猫型の蓄音機は 1 分間に 45 回にゃあと鳴く</blog_title>
  <blog_url>https://nekogata.hatenablog.com/</blog_url>
  <categories>
    <anon>Scala</anon>
  </categories>
  <description>ScalaMatsuriに参加したからというわけではありませんがScalaの話題を。 まず最初に直和型とは 例えばOptionみたいなやつです。Optionは、「必ずSome か Noneのどちらか」であるような型ですが、こういう「必ずAかB（かCか……）である」というような型を直和型と言います。 では、自分で直和型を定義するときのことを考えてみましょう。典型的かつ素直なアイデアとしては、 sealed trait を利用する方法があります。 sealed trait FirstPrecure case object CureBlack extends FirstPrecure case ob…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnekogata.hatenablog.com%2Fentry%2F2014%2F09%2F07%2F174814&quot; title=&quot;Scala で直和型 - 猫型の蓄音機は 1 分間に 45 回にゃあと鳴く&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-09-07 17:48:14</published>
  <title>Scala で直和型</title>
  <type>rich</type>
  <url>https://nekogata.hatenablog.com/entry/2014/09/07/174814</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
