{"description":"@pi8027 \u3042\u3068\u3082\u3063\u3068 fold \u3068\u304b\u4f7f\u3063\u3066\u304f\u308c\u306a\u3044\u3068\u8aad\u3081\u307e\u305b\u3093\u3002\u672c\u7269\u306e Haskeller \u306f\u518d\u5e30\u3082\u30e9\u30e0\u30c0\u5f0f\u3082\u3042\u307e\u308a\u4f7f\u308f\u306a\u3044! @pi8027 countM a l = sequence l >>= return.length.filter (a==) \u306a\u308b\u307b\u3069\u3002sequence \u3067[IO Int]\u304cIO [Int]\u306b\u306a\u3063\u3066\u3001 >>= f \u3067 f\u306b[Int]\u304c\u6e21\u3063\u3066\u3001filter\u3057\u3066length\u3057\u3066return\u3059\u308b\u3001\u3068\u3002","blog_title":"\u897f\u5c3e\u6cf0\u548c\u306e\u306f\u3066\u306a\u30c0\u30a4\u30a2\u30ea\u30fc","author_url":"https://blog.hatena.ne.jp/nishiohirokazu/","width":"100%","categories":["Haskell"],"blog_url":"https://nishiohirokazu.hatenadiary.org/","type":"rich","provider_url":"https://hatena.blog","url":"https://nishiohirokazu.hatenadiary.org/entry/20100520/1274312922","image_url":null,"published":"2010-05-20 08:48:42","version":"1.0","provider_name":"Hatena Blog","title":"\u6628\u65e5\u306e\u7d9a\u304d","author_name":"nishiohirokazu","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnishiohirokazu.hatenadiary.org%2Fentry%2F20100520%2F1274312922\" title=\"\u6628\u65e5\u306e\u7d9a\u304d - \u897f\u5c3e\u6cf0\u548c\u306e\u306f\u3066\u306a\u30c0\u30a4\u30a2\u30ea\u30fc\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}