Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のような方法はありますか:
0 to -10 map { i=> ... }
repl は私に与えます:
scala.collection.immutable.IndexedSeq[Unit] = Vector()
0 to (-10, -1)
また
0 to -10 by -1
by次の句を追加します。
by
0 to -10 by -1 res0: Range(0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10)