<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mzp</author_name>
  <author_url>https://blog.hatena.ne.jp/mzp/</author_url>
  <blog_title>みずぴー日記</blog_title>
  <blog_url>https://mzp.hatenadiary.org/</blog_url>
  <categories>
    <anon>HappyOCaml</anon>
    <anon>OCaml</anon>
    <anon>メモ</anon>
  </categories>
  <description>タプルの第2要素にのみ関数を適用したいことがよくあると思います。Janestreet coreのTupleモジュールにはこれをやる関数が用意されています。 # Core.Tuple.T2.map2;; - : f:('a -&gt; 'b) -&gt; ('c, 'a) Core.Tuple.T2.t -&gt; ('c, 'b) Core.Tuple.T2.t = &lt;fun&gt; # Core.Tuple.T2.map2 ~f:(fun x-&gt;x+1) (1,1);; - : (int, int) Core.Tuple.T2.t = (1, 2) こんな関数あるわけないよなぁ、と思いつつ探してみたら、本当にあって…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmzp.hatenadiary.org%2Fentry%2F20080818%2Fcore&quot; title=&quot;タプルの第2要素にのみ関数を適用したい - みずぴー日記&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>2008-08-18 00:00:01</published>
  <title>タプルの第2要素にのみ関数を適用したい</title>
  <type>rich</type>
  <url>https://mzp.hatenadiary.org/entry/20080818/core</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
