Skip to content

Instantly share code, notes, and snippets.

@gigamonkey
Created June 5, 2013 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gigamonkey/5717295 to your computer and use it in GitHub Desktop.
Save gigamonkey/5717295 to your computer and use it in GitHub Desktop.
This seems suboptimal to me.
scala> def foo() = "foo"
foo: ()String
scala> foo
res6: String = foo
scala> foo()
res7: String = foo
scala> val o = Option("foo")
o: Option[String] = Some(foo)
scala> o.get
res8: String = foo
scala> o.get()
<console>:9: error: not enough arguments for method apply: (index: Int)Char in class StringOps.
Unspecified value parameter index.
o.get()
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment