diff --git a/homeworks/homework_1/task_1/console-output.txt b/homeworks/homework_1/task_1/console-output.txt index e69de29..e1d6873 100644 --- a/homeworks/homework_1/task_1/console-output.txt +++ b/homeworks/homework_1/task_1/console-output.txt @@ -0,0 +1,66 @@ +F:\Programming\Github\OOP\naumen.scala.course.2020.spring>scala +Welcome to Scala 2.12.10 (Java HotSpot(TM) 64-Bit Server VM, Java 11.0.8). +Type in expressions for evaluation. Or try :help. + +scala> val a = "Hello Scala! This is Igor" +a: String = Hello Scala! This is Igor + +scala> val Hellos = List("Привет","Hola") +Hellos: List[String] = List(╧ЁштхЄ, Hola) + +scala> val Hellos = List("Privet", "Hola") +Hellos: List[String] = List(Privet, Hola) + +scala> Hellos.map(x=> println(s"$x Scala! This is Igor") + | + | +You typed two blank lines. Starting a new command. + +scala> + +scala> Hellos.map(x=> println(s"$x Scala! This is Igor") + | + | +You typed two blank lines. Starting a new command. + +scala> println(a) +Hello Scala! This is Igor + +scala> Hellos.map(x=> println(s"$x Scala! This is Igor") + | wtf + | wtf + | how to print it + | + | +You typed two blank lines. Starting a new command. + +scala> Hellos.map(x=> println(s"$x Scala! This is Igor")) +Privet Scala! This is Igor +Hola Scala! This is Igor +res1: List[Unit] = List((), ()) + +scala> val name = "Igor" +name: String = Igor + +scala> Hellos.map(x=> println(s"$x Scala! This is name.reverse()")) +Privet Scala! This is name.reverse() +Hola Scala! This is name.reverse() +res2: List[Unit] = List((), ()) + +scala> Hellos.map(x=> println(s"$x Scala! This is {name.reverse()}")) +Privet Scala! This is {name.reverse()} +Hola Scala! This is {name.reverse()} +res3: List[Unit] = List((), ()) + +scala> Hellos.map(x=> println(s"$x Scala! This is ${name.reverse()}")) +:14: error: not enough arguments for method apply: (index: Int)Char in class StringOps. +Unspecified value parameter index. + Hellos.map(x=> println(s"$x Scala! This is ${name.reverse()}")) + ^ + +scala> Hellos.map(x=> println(s"$x Scala! This is ${name.reverse}")) +Privet Scala! This is rogI +Hola Scala! This is rogI +res5: List[Unit] = List((), ()) + +scala> \ No newline at end of file diff --git a/homeworks/homework_1/task_2/scastie-url.txt b/homeworks/homework_1/task_2/scastie-url.txt index e69de29..53db26f 100644 --- a/homeworks/homework_1/task_2/scastie-url.txt +++ b/homeworks/homework_1/task_2/scastie-url.txt @@ -0,0 +1 @@ +https://scastie.scala-lang.org/B5jOUA0ZSkmuo13X8Ensxw \ No newline at end of file