{"author_url":"https://blog.hatena.ne.jp/Kureduki_Maari/","height":"190","provider_name":"Hatena Blog","blog_url":"https://c4se.hatenablog.com/","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fc4se.hatenablog.com%2Fentry%2F2015%2F04%2F20%2F101926\" title=\"Elixir\u306b\u3066List\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u8981\u7d20\u3092\u53d6\u5f97\u3059\u308b - c4se\u8a18\uff1a\u3055\u3063\u3061\u3083\u3093\u3067\u3059\u3088\u2606\" 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,"title":"Elixir\u306b\u3066List\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u8981\u7d20\u3092\u53d6\u5f97\u3059\u308b","categories":["Programming","Elixir","Erlang"],"url":"https://c4se.hatenablog.com/entry/2015/04/20/101926","provider_url":"https://hatena.blog","version":"1.0","type":"rich","published":"2015-04-20 10:19:26","author_name":"Kureduki_Maari","blog_title":"c4se\u8a18\uff1a\u3055\u3063\u3061\u3083\u3093\u3067\u3059\u3088\u2606","description":"\u8ffd\u8a18:20170702 Enum.random/1\u3092\u4f7f\u3075\u306e\u304c\u597d\u3044\u3002 Enum \u2013 Elixir v1.4.5Ruby\u3060\u3068 xs.sample \u3067\u3042\u308b\u3002JavaScript\u3060\u3068 xs[Math.floor(Math.random() * xs.length)]; \u3068\u306a\u308b\u3002Elixir\u3067\u3082\u3053\u308c\u306b\u8fd1\u3044\u3053\u3068\u3092\u884c\u3075\u3002Erlang\u306erandom\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u307f\u308b\u3068 Enum.at(xs, :random.uniform(Enum.count xs) - 1) \u3068\u306a\u308b\u3002\u3053\u308c\u3067\u3088\u3055\u3055\u3046\u306b\u898b\u3048\u308b\u3002\u3057\u304b\u3057\u4f55\u56de\u304b\u8a66\u3057\u3066\u307f\u308b\u3068\u308f\u304b\u308b\u304c\u3001random\u306e\u4e71\u6570\u5217\u306f\u30b7\u30fc\u30c9\u304c\u4e00\u5b9a\u306a\u306e\u3060\u3002\u624b\u52d5\u3067\u30b7\u30fc\u30c9\u3057\u3066\u3084\u3089\u306a\u3051\u308c\u3070\u3084\u3089\u306a\u3044\u2026"}