{"author_url":"https://blog.hatena.ne.jp/mzp/","published":"2008-05-28 00:00:01","url":"https://mzp.hatenadiary.org/entry/20080528/lift","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmzp.hatenadiary.org%2Fentry%2F20080528%2Flift\" title=\"\u30ec\u30b3\u30fc\u30c9\u3067\u3082lift\u3057\u305f\u3044 - \u307f\u305a\u3074\u30fc\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["OCaml","\u30e1\u30e2"],"title":"\u30ec\u30b3\u30fc\u30c9\u3067\u3082lift\u3057\u305f\u3044","width":"100%","blog_url":"https://mzp.hatenadiary.org/","provider_name":"Hatena Blog","blog_title":"\u307f\u305a\u3074\u30fc\u65e5\u8a18","image_url":null,"description":"\u3053\u3093\u306a\u3044\u304f\u3064\u304b\u306e\u5024\u3092\u307e\u3068\u3081\u3066\u6271\u3046\u305f\u3081\u306b\u30ec\u30b3\u30fc\u30c9\u3092\u5b9a\u7fa9\u3057\u305f\u3002 type some_record = {x:int list;y:float list} \u305d\u3057\u3066\u3001\u3053\u308c\u3092\u64cd\u4f5c\u3059\u308b\u95a2\u6570\u3092\u3044\u304f\u3064\u304b\u66f8\u3044\u305f\u3002 let append {x=x1;y=y1} {x=x2;y=y2}= {x=x1@x1; y=y1@y1} \u3053\u3046\u3044\u3063\u305f\u95a2\u6570\u304c\u3044\u304f\u3064\u304b\u3067\u304d\u3066\u304f\u308b\u3068\u9762\u5012\u306a\u306e\u3067\u3001\u6b21\u306e\u3088\u3046\u306a\u9ad8\u968e\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u305f\u304f\u306a\u3063\u305f\u3002 let lift f {x=x1;y=y1} {x=x2;y=y2} = {x=f x1 x2; y=f y1 y2} (* \u3053\u3093\u306a\u98a8\u306b\u5b9a\u7fa9\u3067\u304d\u308b\u306f\u305a *) let append' x y= lift (@\u2026","type":"rich","height":"190","provider_url":"https://hatena.blog","author_name":"mzp","version":"1.0"}