<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>osiire</author_name>
  <author_url>https://blog.hatena.ne.jp/osiire/</author_url>
  <blog_title>osiire’s blog</blog_title>
  <blog_url>https://osiire.hatenablog.com/</blog_url>
  <categories>
    <anon>多相バリアント</anon>
  </categories>
  <description>前回は、OCamlの多相バリアント型のタグは複数の多相バリアント型に属する事ができるというお話でした。では、この性質を応用するとどんな嬉しいことがあるのでしょうか?今日はまず、多相バリアントを組み合わせる場合のストーリーを挙げてみたいと思います。 多相バリアント型を組み合わせる 例えば、キーボードイベントとマウスイベントを定義するバリアント型があったとします。 # type keyboard_event = KeyPress of char | KeyRelease of char;; type keyboard_event = KeyPress of char | KeyRelease of…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fosiire.hatenablog.com%2Fentry%2F20090512%2F1242055541&quot; title=&quot;多相バリアントを使いこなそう(2) - osiire’s blog&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-05-12 00:25:41</published>
  <title>多相バリアントを使いこなそう(2)</title>
  <type>rich</type>
  <url>https://osiire.hatenablog.com/entry/20090512/1242055541</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
