<?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>Ocaml</anon>
    <anon>30分プログラム</anon>
  </categories>
  <description>30分プログラム、その342。たまにはProject Euler以外も。 Haskellの関数、特にPreludeにあるようなやつは実に考えられている。例えば、foldl1あたりは簡単に書けるのに、かなりいろんなところで使えて便利だったりする。 というわけで、このあたりの関数をOCamlに移植してみる。とりあえずリスト関係の関数から。いちおうユニットテストも書いておいた。 使い方 # last [1;2];; - : int = 2p # sum [1;2;3];; - : int = 6 ソースコード let (@@) f g = f g let ($) f g x = f (g x) le…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmzp.hatenadiary.org%2Fentry%2F20080804%2Fhlist&quot; title=&quot;Haskellのリスト操作をOCamlに移植(1) - みずぴー日記&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-04 00:00:00</published>
  <title>Haskellのリスト操作をOCamlに移植(1)</title>
  <type>rich</type>
  <url>https://mzp.hatenadiary.org/entry/20080804/hlist</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
