{"height":"190","image_url":null,"provider_name":"Hatena Blog","published":"2009-07-22 00:57:47","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjeneshicc.hatenadiary.org%2Fentry%2F20090722%2F1248278267\" title=\"GMAP - \u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"GMAP","categories":["Memo","Haskell"],"blog_title":"\u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66","width":"100%","description":"import Data.List -- greedy algorithm next :: Integral a => a ->[a] -> [a] next c ms = bs ++ 1: genericReplicate n 0 where (as, bs) = genericSplitAt c ms n = c - sum as sequences :: Integral a => a -> a -> [[a]] sequences c n | c > n = [] | otherwise = iterate (next c) $ genericReplicate n 0 -- Test \u2026","author_url":"https://blog.hatena.ne.jp/jeneshicc/","type":"rich","author_name":"jeneshicc","blog_url":"https://jeneshicc.hatenadiary.org/","version":"1.0","provider_url":"https://hatena.blog","url":"https://jeneshicc.hatenadiary.org/entry/20090722/1248278267"}