Skip to content

Commit

Permalink
Minor doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhanak committed Aug 14, 2023
1 parent e85fc5c commit 9db708b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# InlineDispatch.jl

A simple module to perform dispatch on a value of an expression using the
A simple module to perform dispatch on the value of an expression using the
`@dispatch` macro.

```julia
Expand All @@ -24,22 +24,22 @@ matter, the most specific match is chosen, as customary with Julian dispatch.

```julia
julia> @dispatch 42 begin
i::Integer -> "int \$i"
r::Real -> "real \$r"
i::Integer -> "int $i"
r::Real -> "real $r"
::Nothing -> "nothing"
end
"int 42"

julia> @dispatch π begin
i::Integer -> "int \$i"
r::Real -> "real \$r"
i::Integer -> "int $i"
r::Real -> "real $r"
::Nothing -> "nothing"
end
"real π"

julia> @dispatch "foo" begin
i::Integer -> "int \$i"
r::Real -> "real \$r"
i::Integer -> "int $i"
r::Real -> "real $r"
::Nothing -> "nothing"
end
ERROR: @dispatch: Unmatched type String!
Expand Down

0 comments on commit 9db708b

Please sign in to comment.