Content of Friday's lecture

Benutzeravatar
tahir
Neuling
Neuling
Beiträge: 5
Registriert: 22. Okt 2014 17:30

Content of Friday's lecture

Beitrag von tahir »

Last lecture's slides are not available online. Please upload the slides.

Also, is it possible to share the example code from last lecture ?

Thanks,
Tahir
Sincerely,
Tah Iblis

eichberg
Dozentin/Dozent
Beiträge: 448
Registriert: 25. Sep 2007 12:12
Kontaktdaten:

Re: Content of Friday's lecture

Beitrag von eichberg »

Everything is now online. Sorry about the delay! I apologize for the inconveniences caused.

eichberg
Dozentin/Dozent
Beiträge: 448
Registriert: 25. Sep 2007 12:12
Kontaktdaten:

Re: Content of Friday's lecture

Beitrag von eichberg »

Usage of the Scala REPL

Code: Alles auswählen

scala> val l = 121 :: 2323 :: 23 :: Nil
l: List[Int] = List(121, 2323, 23)

scala> val x :: y :: _ = l
x: Int = 121
y: Int = 2323

scala> l match { case x :: y :: z :: Nil => true; case _ => false}
res0: Boolean = true

scala> l match { case x :: y :: Nil => true; case _ => false}
res1: Boolean = false

scala> val l = 121 :: 2323 :: 23.2d :: Nil
l: List[AnyVal] = List(121, 2323, 23.2)

scala> val x :: y :: z ::  _ = l
x: AnyVal = 121
y: AnyVal = 2323
z: AnyVal = 23.2
= 23.2

Benutzeravatar
tahir
Neuling
Neuling
Beiträge: 5
Registriert: 22. Okt 2014 17:30

Re: Content of Friday's lecture

Beitrag von tahir »

thank you Dr. Eichberg.
Sincerely,
Tah Iblis

Antworten

Zurück zu „Archiv“