Skip to content

Commit

Permalink
Fix formatting & typo in methods.md (JuliaLang#53486)
Browse files Browse the repository at this point in the history
* Fixed what I suspect is a typo: commonly -> common 
* Added code quotes to eltype: eltype -> `eltype`

Sentence now reads:
Instead, common code will dispatch first on the container type, then
recurse down to a more specific method based on `eltype`.
  • Loading branch information
Pyfagorass committed Feb 27, 2024
1 parent 2b79326 commit b18a62d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/src/manual/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,8 @@ often it is best to separate each level of dispatch into distinct functions.
This may sound similar in approach to single-dispatch, but as we shall see below, it is still more flexible.

For example, trying to dispatch on the element-type of an array will often run into ambiguous situations.
Instead, commonly code will dispatch first on the container type,
then recurse down to a more specific method based on eltype.
Instead, common code will dispatch first on the container type,
then recurse down to a more specific method based on `eltype`.
In most cases, the algorithms lend themselves conveniently to this hierarchical approach,
while in other cases, this rigor must be resolved manually.
This dispatching branching can be observed, for example, in the logic to sum two matrices:
Expand Down

0 comments on commit b18a62d

Please sign in to comment.