May. 11th, 2020

juan_gandhi: (Default)
Shakespeare, "Macbeth". Worth rereading, and again. And memorizing. Thrice.


juan_gandhi: (Default)
Welcome to Scala 2.12.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_92).
Type in expressions for evaluation. Or try :help.

scala> def f(x: Int) = 10 + x -> "ok"
f: (x: Int)(Int, String)

scala> f(10)
res0: (Int, String) = (20,ok)

scala> def g(x: Int) = 20 + x → "oops"
:11: error: overloaded method value + with alternatives:
  (x: Double)Double 
  (x: Float)Float 
  (x: Long)Long 
  (x: Int)Int 
  (x: Char)Int 
  (x: Short)Int 
  (x: Byte)Int 
  (x: String)String
 cannot be applied to ((Int, String))
       def g(x: Int) = 20 + x → "oops"
                          ^

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

November 2025

S M T W T F S
       1
23456 78
9101112131415
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Nov. 8th, 2025 06:11 am
Powered by Dreamwidth Studios