Skip to content

Commit

Permalink
minor typos in the doc of applyOrElse
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnhoekstra committed Feb 25, 2014
1 parent b4ff1e9 commit c1cb5e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/library/scala/PartialFunction.scala
Expand Up @@ -94,7 +94,7 @@ trait PartialFunction[-A, +B] extends (A => B) { self =>
* Note that expression `pf.applyOrElse(x, default)` is equivalent to
* {{{ if(pf isDefinedAt x) pf(x) else default(x) }}}
* except that `applyOrElse` method can be implemented more efficiently.
* For all partial function literals compiler generates `applyOrElse` implementation which
* For all partial function literals the compiler generates an `applyOrElse` implementation which
* avoids double evaluation of pattern matchers and guards.
* This makes `applyOrElse` the basis for the efficient implementation for many operations and scenarios, such as:
*
Expand Down

0 comments on commit c1cb5e4

Please sign in to comment.