2014-06-01から1ヶ月間の記事一覧

Scala Tutorialsを読む 22 Arrays

http://scalatutorials.com/tour/interactive_tour_of_scala_arrays.html 今日は配列です。 Arrays are constructed simply using Array(element1, element2, ...) 配列はシンプルにArray(要素1,要素2,...)を使って構築されます。

Scala Tutorialsを読む 21 Match as a Switch

http://scalatutorials.com/tour/interactive_tour_of_scala_match_as_a_switch.html 21 Match as a Switch switchとしてのmatchか。as a でとしてって意味があるらしい。 Pattern matching will be familiar to anyone coming from a Haskell background, …

Scala Tutorialsを読む 20 If

http://scalatutorials.com/tour/interactive_tour_of_scala_if.html 20 If Conditions are almost the same as in imperative languages such as Java or C. 条件はほぼ、命令的な言語のJavaやCと同じです。 However one important thing to remember in Sc…

Scala Tutorialsを読む 19 Loops without loops

Scala Tutorialsを読む 19 Loops without loops http://scalatutorials.com/tour/interactive_tour_of_scala_loops_without_loops.html 19 ループのないループ The "Scala" way (or Functional way) of performing a sum of numbers. 数値の合計の計算のScal…

Scala Tutorialsを読む 18 Loops using for

http://scalatutorials.com/tour/interactive_tour_of_scala_loops_using_for.html 今日は18 Loops using forをforを使ったループを読みます。 Scalaのforは、凄く高機能で高級な機能を持っているのですが、その触りで結構普通にループしています。 For loop…

Scala Tutorialsを読む 17 Loops using while

http://scalatutorials.com/tour/interactive_tour_of_scala_loops_using_while.html よし追いついた。今日は17のwhileを使ったループだ。 17 Loops using while Scala doesn't have a "classic" equivalent to the imperative for loop construct that exis…

Scala Tutorialsを読む 16 Assign multiple variables

http://scalatutorials.com/tour/interactive_tour_of_scala_assign_multiple_variables.html 今日は、16 Assign multiple variables 複数の変数の代入かな? Using Tuples, it is possible to assign multiple values to multiple variables (either var or…

Scala Tutorialsを読む 15 Declare multiple variables

今日は15 Declare mltiple variables です。 http://scalatutorials.com/tour/interactive_tour_of_scala_declare_multiple_variables.html 2日遅れてる。どうも、2週間で何かしらの脳内の限界が来るような気がする。半月といったらいいのかな。辛いってい…

Scala Tutorialsを読む 14 Return multiple variables

http://scalatutorials.com/tour/interactive_tour_of_scala_return_multiple_variables.html 今日はこの、14 Return multiple variablesを読みます。 複数の値を返すかな? It is possible to return multiple variables using Tuples これはTuple(多値)を…

Scala Tutorialsを読む 13 Anonymous Functions 2

http://scalatutorials.com/tour/interactive_tour_of_scala_anonymous_functions_2.html 今日は、13 Anonymous Functions 2 を読みます。今日といいつつ今日は14日なので1日忘れてしまったので、2日分書かないといけない。 The first example is a method…

Scala Tutorialsを読む 12 Anonymous Functions

http://scalatutorials.com/tour/interactive_tour_of_scala_anonymous_functions.html 今日は Scala Tutorials の12 Anonymous Functions を読みます。 AnonymousっていうとFTP接続する時とかに名前無しでログインするのに使ったりする名無しって意味がある…

Scala Tutorialsを読む 11 Method definition 3

http://scalatutorials.com/tour/interactive_tour_of_scala_method_definition_3.html 今日は11 Method definition 3です。 Curly braces are optional on single line method bodies. カーリーブレース {}はシングルラインメソッドの本体ならオプションで…

Scala Tutorialsを読む 10 Method definition 2

http://scalatutorials.com/tour/interactive_tour_of_scala_method_definition_2.html 今日は10 Method definition 2を読みます。 return keyword is optional リターンキーワードはオプショナルです。 Return type is inferred リターン型は推論されます (…

Scala Tutorialsを読む 9 Method definition

http://scalatutorials.com/tour/interactive_tour_of_scala_method_definition.html 今日は 9 Method definition メソッドの定義について In Scala methods are defined using def Scalaではメソッドはdefを使って定義されます Methods that return a value…

Scala Tutorialsを読む 8 Useful operations

http://scalatutorials.com/tour/interactive_tour_of_scala_useful_operations.html 今日は、8 Useful operations 使える機能ってところかな? Scala has many "syntactic sugars" for many common operations. Scalaには沢山のシンタックスシュガーがあり…

Scala Tutorialsを読む 7 String formatting

今日は、 http://scalatutorials.com/tour/interactive_tour_of_scala_string_formatting.html を読みます。 書くの忘れてたのだけど、C言語のprintf的な物がScalaにもあるよっていう。 printf works as well... printf は同じように動きます... 瞬殺すぎ…

Scala Tutorialsを読む 6 String interpolation

http://scalatutorials.com/tour/interactive_tour_of_scala_string_interpolation.html 今日は、6 String interpolationです。 interpolationは内挿法とかがいいのかな?文字列内挿法? 文字列に式が書ける奴ですね。 interpolationはSwiftでもあったり、Ne…

Scala Tutorialsを読む 5 Printing values

http://scalatutorials.com/tour/interactive_tour_of_scala_printing_values.html 今日は5のPrinting valuesを読みます。 値の出力とかか。 Scala has a "shortcut" to Java's System.out.println ScalaはJavaのSystem.out.printlnのショートカットを持って…

Scala Tutorialsを読む 4 Final Variables

今日は4 Final Variablesを読みます。 http://scalatutorials.com/tour/interactive_tour_of_scala_final_variables.html Final変数ですな。Swift騒ぎで忘れてたよ orz... FInal variables are declared using the val keyword Final変数はvalキーワードを使…

Scala Tutorialsを読む 3

今日は 3 Variables を読みます。 http://scalatutorials.com/tour/interactive_tour_of_scala_variables.html 変数ですね。 Variables are declared using the var keyword 変数はvarキーワードを使って宣言されます。 In many cases, 多くの場合に、 the t…

Scala Tutorialsを読む 2

今日は2を読みます。 http://scalatutorials.com/tour/interactive_tour_of_scala_operators_are_methods.html 2 Operators are methods 演算子はメソッドだ In Scala スカラでは primitives are represented as objects. プリミティブはオブジェクトとし表…

Scala Tutorialsを読む 1

今月は毎日 Scala Tutorialsを読んでみようと思います。 技術的な事を突き詰めていくと、日本語の資料がなくて、 英語の文献を調べないと行けなくなる事がよくあります。 英語の能力が高ければ問題ないのですが、自分のように英語の能力が低い人にとって知ら…