<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fumokmm</author_name>
  <author_url>https://blog.hatena.ne.jp/fumokmm/</author_url>
  <blog_title>No Programming, No Life</blog_title>
  <blog_url>https://npnl.hatenablog.jp/</blog_url>
  <categories>
    <anon>Groovy</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>Groovyだと、eachなどのイテレーションメソッドが豊富なので処理とイテレーションの分離が楽にできる。 お題 例えば、 1〜10までの数値が入ったリストから繰り返し数値を取得し 出力するプログラムを完成させよ。ただし、数値が5の時は表示しないこと。 なんてお題があった場合、あなたならどう書くだろうか。 ひとまず、一番簡単に思いつくのは以下のようなコードだろう。 def list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] for (i in list) { if( i != 5 ) { print i } } 問題点 実はこのコードには問題がある。それは何か。それは…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnpnl.hatenablog.jp%2Fentry%2F20090201%2F1233491019&quot; title=&quot;Groovyで処理とイテレーションの分離 - No Programming, No Life&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-02-01 21:23:39</published>
  <title>Groovyで処理とイテレーションの分離</title>
  <type>rich</type>
  <url>https://npnl.hatenablog.jp/entry/20090201/1233491019</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
