<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>innocent-zero</author_name>
  <author_url>https://blog.hatena.ne.jp/innocent-zero/</author_url>
  <blog_title>ブログ</blog_title>
  <blog_url>https://gouf.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>思いついたので書く 課題設定 入力値の例 期待する出力 書いたコード 課題設定 与えられた1次元配列を順次捜査して、現在位置からひとつ前を参照しつつ、それと現在の要素とを合成した Range オブジェクトを作りたい そのとき、処理結果として見たときの範囲は被らないようにしたい 入力値の例 [1, 5, 10] 期待する出力 [0..1, 2..5, 6..10] 書いたコード if は振り分けに徹してもらった (｀・ω・´) def solver(list = [], previous = nil, ret = []) return ret if list.size.zero? current…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgouf.hatenablog.com%2Fentry%2F2018%2F04%2F06%2F153639&quot; title=&quot;配列から範囲を生成する - ブログ&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>2018-04-06 15:36:39</published>
  <title>配列から範囲を生成する</title>
  <type>rich</type>
  <url>https://gouf.hatenablog.com/entry/2018/04/06/153639</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
