Subscribe to ...considered harmful        RSS Feed
- - - - -

My First Scala "Hulk Smash" moment

Icon 6 Comments
Scala has tuples. Great, I like tuples. Immutable sequences, quite handy.
Here's one:
scala> val triple = (1,2,3)triple: (Int, Int, Int) = (1,2,3)


Cool. So how do I get a value out of one of these guys? Like this:

scala> triple._1res6: Int = 1
...

Page 1 of 1

September 2012

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Tags

    Recent Entries

    Recent Comments

    Search My Blog

    0 user(s) viewing

    0 Guests
    0 member(s)
    0 anonymous member(s)

    Categories