added lesson 9
This commit is contained in:
parent
bed771a04e
commit
c13f9851e3
15
src/Lesson9/PimpMyLibrary.scala
Normal file
15
src/Lesson9/PimpMyLibrary.scala
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package Lesson9
|
||||||
|
|
||||||
|
import scala.language.{implicitConversions, postfixOps}
|
||||||
|
|
||||||
|
object PimpMyLibrary extends App{
|
||||||
|
/*class PimpedString(s: String) {
|
||||||
|
def increment: String = new String(s.toCharArray.map(_ + 1))
|
||||||
|
}
|
||||||
|
|
||||||
|
implicit def str2Pimped(s: String): PimpedString = new PimpedString(s)
|
||||||
|
|
||||||
|
println("Hal" increment)*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user