<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Kazuhira</author_name>
  <author_url>https://blog.hatena.ne.jp/Kazuhira/</author_url>
  <blog_title>CLOVER🍀</blog_title>
  <blog_url>https://kazuhira-r.hatenablog.com/</blog_url>
  <categories>
    <anon>Scala</anon>
    <anon>Groovy</anon>
  </categories>
  <description>最近、業務でこそっとGroovyを使いだしているのですが、軽くクロージャ周りでハマったのでメモ。別に階乗のプログラムが書きたかったわけではないのですが、サンプルとして。 def factorial = { n -&gt; if (n &gt; 0) { n * factorial(n - 1) } else { 1 } } println(factorial(args[0].toInteger())) こんなプログラムを書いて、実行します。 $ groovy recur_closure.groovy 5 Caught: groovy.lang.MissingMethodException: No sign…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkazuhira-r.hatenablog.com%2Fentry%2F20120318%2F1332078701&quot; title=&quot;ScalaとGroovyのクロージャで、再帰を使った場合の違い - CLOVER🍀&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>2012-03-18 22:51:41</published>
  <title>ScalaとGroovyのクロージャで、再帰を使った場合の違い</title>
  <type>rich</type>
  <url>https://kazuhira-r.hatenablog.com/entry/20120318/1332078701</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
