{"blog_title":"yohhoy\u306e\u65e5\u8a18","provider_url":"https://hatena.blog","version":"1.0","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20121108%2Fp1\" title=\"C++\u3067CPS - yohhoy\u306e\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>","blog_url":"https://yohhoy.hatenadiary.jp/","categories":["C++"],"provider_name":"Hatena Blog","width":"100%","description":"C++11\u304b\u3089\u306f\u30e9\u30e0\u30c0\u5f0f\u304c\u5c0e\u5165\u3055\u308c\u3001CPS(Continuation Passing Style; \u7d99\u7d9a\u6e21\u3057\u30b9\u30bf\u30a4\u30eb)\u3067\u7c21\u5358\u306b\u8a18\u8ff0\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\uff08\u3068\u601d\u3046\uff09\u3002\u5b9f\u7528\u6027\u306e\u7a0b\u306f\u3068\u3082\u304b\u304f\u3002 #include <functional> #include <iostream> // \u968e\u4e57\u8a08\u7b97 int fact(int n) { if (n == 0) return 1; else return n * fact(n - 1); } // \u968e\u4e57\u8a08\u7b97/CPS void fact_cps(int n, std::function<void(int)> k) { if (n == 0) k(1); else f\u2026","url":"https://yohhoy.hatenadiary.jp/entry/20121108/p1","height":"190","author_url":"https://blog.hatena.ne.jp/yohhoy/","title":"C++\u3067CPS","author_name":"yohhoy","published":"2012-11-08 00:00:00","image_url":null}