{"published":"2022-10-29 16:32:58","height":"190","categories":["OCaml","\u578b\u7406\u8ad6","\u8a00\u8a9e\u51e6\u7406\u7cfb"],"url":"https://zehnpaard.hatenablog.com/entry/2022/10/29/163258","type":"rich","image_url":null,"blog_url":"https://zehnpaard.hatenablog.com/","version":"1.0","width":"100%","author_name":"zehnpaard","description":"\u524d\u56de\u306b\u7d9a\u3044\u3066Let\u591a\u76f8\u306e\u5b9f\u88c5\u3092\u898b\u3066\u3044\u304f\u3002 generalize \u524d\u56de\u66f8\u3044\u305f\u3068\u304a\u308a\u3001generalize\u306fLet\u5f0f\u3067\u300c\u5909\u6570\u306e\u578b\u300d\u3092\u6c4e\u5316\u3059\u308b\uff1a let rec typeof env = function ... | ELet(svar, e, ebody) -> let tvar = typeof env e in let tgen = generalize (List.map snd env) tvar in typeof ((svar,tgen)::env) ebody \u5909\u6570svar\u3092\u675f\u7e1b\u3059\u308b\u5bfe\u8c61\u3067\u3042\u308be\u5f0f\u306e\u578btvar\u3092\u6c4e\u5316\u3057\u3066tgen\u3068\u3044\u3046\u65b0\u3057\u3044\u578b\u306b\u3057\u3066\u3044\u308b\u3002(List.map snd en\u2026","blog_title":"Arantium Maestum","author_url":"https://blog.hatena.ne.jp/zehnpaard/","provider_url":"https://hatena.blog","title":"\u578b\u63a8\u8ad6\u3092\u5b9f\u88c5\u30fb\u6539\u5584\u3057\u3066\u3044\u304f\uff18\u3000Let\u591a\u76f8\u578b\u63a8\u8ad6\uff08\u5f8c\u7de8\uff09","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fzehnpaard.hatenablog.com%2Fentry%2F2022%2F10%2F29%2F163258\" title=\"\u578b\u63a8\u8ad6\u3092\u5b9f\u88c5\u30fb\u6539\u5584\u3057\u3066\u3044\u304f\uff18\u3000Let\u591a\u76f8\u578b\u63a8\u8ad6\uff08\u5f8c\u7de8\uff09 - Arantium Maestum\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog"}