あなたをより良いプログラマーにする,コミットメセージのちょっとした変更.
フォーマット: <タイプ>(<スコープ>): <件名>
<スコープ>
は省略可能.
def fizzbuzz(table: Seq[(Int, String)])(i: Int): String = { | |
val s = table.map { case (num, mes) => | |
if (i % num == 0) mes else "" | |
}.mkString("") | |
(if (s.isEmpty) i.toString else s) | |
} | |
def fizzbuzzStream(table: Seq[(Int, String)]): Stream[String] = | |
Stream.from(1).map(fizzbuzz(table)(_)) |
- ー | |
~ ~ | |
, 、 | |
. 。 | |
/ ・ | |
: ー | |
; っ | |
[ 「 | |
] 」 | |
a あ |