KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I wonder why there doesn't exist a literal for partial function types. I have to write val pf: PartialFunction[Int, String] = { case 5 => "five" } where an literal like :=> would be shorter: val pf: Int :=> String = { case 5 => "five" } Partial functions are often used and in Scala already some "special" feature, so why no special syntax for it?
Tags (comma-separated)
Save Edits
Cancel