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には沢山のシンタックスシュガーがあります。沢山の共通な機能のための

Some useful ones are show on the left. いくつかの使えるやつは左のソースで見れます。

Play with the examples 例で遊んでみてください。

( click the green "Play" button to run) (緑のPlayボタンをクリックして実行だ)

and once you feel comfortable continue to the next step そして あなたは感じるcomfortableってなんだ?快適さか。 そしてあなたが快適さを感じたら次のステップへ続きましょう。

More will be explained later on もっと以降で説明されています。 explainは説明するの意味っと。

レンジは 1 to 10とか 1 until 10とか 2 until 10 by 3とかとかけて、 レンジからリストを作ったりも出来る 数の絶対値はnum.absってかけたり、maxは num.max(7)ってかけたりするし

文字列のreverseやcapitalizeとか文字列のかけ算で複数回の連続にできたり "123".toIntでパースできたり、 range.filter( > 4)で4より大きいってできたり、range2.map( * 2)で2倍に出来たり便利だな ってことですね。