ב lists.scala def sum(xs: List): Int = (0 /: xs) (_ + _)
def max(xs: List): Int = xs reduceLeft (_ max _)
תעתיק את הטקסט ל notepad כדי שלא יהיה יישור לימין כי זה משבש את איך שהקוד נראה
זה בעיקרון כל מה שהוספתי
בנוסף שיניתי ב listssuite.scala
test("one plus two is three?") {
assert(1 + 2 == 3) // This assertion fails! Go ahead and fix it.
}
ואת
test("details why one plus one is not three") {
assert(1 + 2 === 3) // Fix me, please!
}
תודה רבה על העזרה