<?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>
  </categories>
  <description>OCaml Advent Calendar二日目です。 Adapterパターンの次はBridgeパターンですが、これは継承と委譲を組み合わせる話なので前回のAdapterパターンと記述的には同じです。省略。という事で、今回はCompositeパターンをOCamlで記述してみます。Compositeパターン(wikipedia)Compositeパターンは木構造を作る時に使えるらしい。共通インターフェイスを定義して枝と葉を抽象的に扱います。 module FileSystem = struct (* FileInterfaceに相当する型. Folderが子供としてtのlistを持っている. *…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fosiire.hatenablog.com%2Fentry%2F20121202&quot; title=&quot;GoF in OCaml for Advent Calendar 2012 #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>2012-12-02 00:00:00</published>
  <title>GoF in OCaml for Advent Calendar 2012 #2</title>
  <type>rich</type>
  <url>https://osiire.hatenablog.com/entry/20121202</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
