คำถามในหัวข้อ 'scala-2.10'

การใช้ TypeTag ของ Scala 2.10
ฉันกำลังขุด API การสะท้อนสกาล่าใหม่และไม่เข้าใจว่าทำไมตัวอย่างต่อไปนี้จึงไม่ทำงานตามที่คาดไว้ กำหนดลำดับชั้น (พยายามลดความซับซ้อนให้มากที่สุด): import scala.reflect.runtime.universe._ trait TF[A] { implicit def t: TypeTag[A] def f[T <:...
4128 มุมมอง
schedule 17.12.2023

การกลับมาใน Scala For loop
ฉันยังใหม่กับ Scala เลยพยายามทำสิ่งง่ายๆ ก่อน ฉันเขียนวิธีการซึ่งอยู่ด้านล่าง //Given a list of numbers find the first number that is a multiple of 7 def FindFirstMultiple(input: List[Int]) : Int = { for ( i <- input...
1771 มุมมอง
schedule 18.12.2023