Tags
#odersky-programming-in-scala-1ed #scala
Question
The only identifiers that can be used as prefix operators are + , [...] , ! , and ~ .
-

Tags
#odersky-programming-in-scala-1ed #scala
Question
The only identifiers that can be used as prefix operators are + , [...] , ! , and ~ .
?

Tags
#odersky-programming-in-scala-1ed #scala
Question
The only identifiers that can be used as prefix operators are + , [...] , ! , and ~ .
-
If you want to change selection, open original toplevel document below and click on "Move attachment"

#### Parent (intermediate) annotation

Open it
The only identifiers that can be used as prefix operators are + , - , ! , and ~ .

#### Original toplevel document

Basic Types and Operations
demonstrate this to yourself by typing the method call both via operator notation and explicitly: scala> -2.0 // Scala invokes (2.0).unary_- res2: Double = -2.0 scala> (2.0).unary_- res3: Double = -2.0 <span>The only identifiers that can be used as prefix operators are +, -, !, and ~. Thus, if you define a method named unary_!, you could invoke that method on a value or variable of the appropriate type using prefix operator notation, such as !p. But if you define a me

#### Summary

status measured difficulty not learned 37% [default] 0

No repetitions