<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shigemk2</author_name>
  <author_url>https://blog.hatena.ne.jp/shigemk2/</author_url>
  <blog_title>by shigemk2</blog_title>
  <blog_url>https://www.shigemk2.com/</blog_url>
  <categories>
    <anon>Scala</anon>
  </categories>
  <description>以下2つのプログラムで挙動が違う。上の関数の戻り値はUnit 下の関数の戻り値はIntになる。 def double(i: Int) { 2 * i } println(double(2)) def double(i: Int) = { 2 * i } println(double(2)) 本体の前に等号を持つメソッドを関数の定義とみなし、関数型プログラミングにおいて関数は常に値を返す、とのこと。 Programming Scala: Scalability = Functional Programming + Objects作者: Dean Wampler,Alex Payne出版社/メーカ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shigemk2.com%2Fentry%2Fscala_function_declaration&quot; title=&quot;Scalaの関数定義 - by shigemk2&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>http://ecx.images-amazon.com/images/I/51IG1oJqtoL.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-09-25 23:11:05</published>
  <title>Scalaの関数定義</title>
  <type>rich</type>
  <url>https://www.shigemk2.com/entry/scala_function_declaration</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
