0

Possible Duplicate:
What does => and () => mean in Scala

In Scala, what does the => operator do? For example, in the below case statement:

myVar match
{
  case 1 => print(num1 + num2)
}

Is the "operator" just a shorthand way of writing something more verbose?

Community
  • 1
  • 1
William
  • 521
  • 7
  • 21
  • 1
    Use [SymbolHound](http://symbolhound.com/) to lookup non-googlable things like _ :: => operators in scala. – om-nom-nom Dec 26 '12 at 01:40
  • Now I know why they call him om-nom-nom. Read Alex Cruise's answer http://stackoverflow.com/a/6952195/1296806 and then follow the possible dupe to Daniel Sobral's http://stackoverflow.com/a/4545703/1296806. Not everything is an operator. Sometimes a cigar is just a cigar. – som-snytt Dec 26 '12 at 01:53

0 Answers0