{"categories":["RUBY"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fso-wh.at%2Fentry%2F20110906%2Fp1\" title=\" \u9806\u5217\u3092\u3059\u3079\u3066\u8210\u3081\u308b - so what\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"published":"2011-09-06 00:00:01","width":"100%","title":" \u9806\u5217\u3092\u3059\u3079\u3066\u8210\u3081\u308b","provider_url":"https://hatena.blog","url":"https://so-wh.at/entry/20110906/p1","version":"1.0","description":"\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8907\u6570\u306e\u96c6\u5408\u304c\u3042\u3063\u305f\u5834\u5408\u306b sets = [ [1,2,3,4], [5,6,7], [8,9], ] \u3059\u3079\u3066\u306e\u9806\u5217\u3092\u8210\u3081\u308b\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u307f\u308b\u3002 def permutation(stack, ary = [], &block) list = stack.shift list.each do |i| if stack.empty? block.call(ary + [i]) else permutation(stack, ary + [i], &block) end end stack.unshift(list) end permutation(sets) do |seq| p seq\u2026","type":"rich","height":"190","author_url":"https://blog.hatena.ne.jp/winebarrel/","author_name":"winebarrel","blog_title":"so what","provider_name":"Hatena Blog","blog_url":"https://so-wh.at/"}