<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ku-ma-me</author_name>
  <author_url>https://blog.hatena.ne.jp/ku-ma-me/</author_url>
  <blog_title>まめめも</blog_title>
  <blog_url>https://mametter.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>簡単なことをする map を書くのが面倒です。配列の各要素に 1 足す程度のことで、いちいち .map {|x| x + 1 } などと 12 ストローク (空白除く) も必要なんですよ。しかもなんかごちゃごちゃして読みにくい。 使用頻度の低い inject とかなら許せるんですが、特に使用頻度の高い map くらいは短く書きたい。ブロック変数名を決める必要があるのも面倒くさい。&quot;{|x|&quot; の部分と &quot;}&quot; の部分が異なる箇所に分かれるのも気に入らない *1 。 そこで考えた。こんなのどうだろう。 # 各要素に 1 を足す p [1, 2, 3].dmap + 1 #=&gt; [2, 3, 4]…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmametter.hatenablog.com%2Fentry%2F20090312%2Fp1&quot; title=&quot; map が面倒なので DelegateMap - まめめも&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>2009-03-12 00:00:00</published>
  <title> map が面倒なので DelegateMap</title>
  <type>rich</type>
  <url>https://mametter.hatenablog.com/entry/20090312/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
