<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>osyo-manga</author_name>
  <author_url>https://blog.hatena.ne.jp/osyo-manga/</author_url>
  <blog_title>Secret Garden(Instrumental)</blog_title>
  <blog_url>https://secret-garden.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>元ネタ 計算量O(n)の画期的なソートアルゴリズムであるスターリンソートをHaskell で実装してみた #Haskell - Qiita と、いうことで Ruby でも書いてみました。 ただ書くだけじゃつまらないので Ruby 2.7 で追加予定のパターンマッチを使ってみるなど。 コード def stalin_sort(xs) case xs in [] [] in [x] [x] in [x, y, *zs] if x &lt; y [x] + stalin_sort([y, *zs]) else stalin_sort [x, *zs] end end p stalin_sort [1, 2,…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsecret-garden.hatenablog.com%2Fentry%2F2019%2F07%2F30%2F200746&quot; title=&quot;Ruby 2.7 でスターリンソートを書いてみた - Secret Garden(Instrumental)&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-07-30 20:07:46</published>
  <title>Ruby 2.7 でスターリンソートを書いてみた</title>
  <type>rich</type>
  <url>https://secret-garden.hatenablog.com/entry/2019/07/30/200746</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
