Skip to content

Commit

Permalink
Merge #20
Browse files Browse the repository at this point in the history
20: Use more concise syntax in README r=charleskawczynski a=ali-ramadhan

Not sure if this is a positive change but I thought it looked more intuitive.

Co-authored-by: Ali Ramadhan <[email protected]>
  • Loading branch information
bors[bot] and ali-ramadhan authored Mar 17, 2021
2 parents 22dae1d + 1409dc8 commit ca95935
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ DispatchedTuple{Tuple{Tuple{Foo,Int64},Tuple{Foo,Int64},Tuple{Bar,Int64}},Dispat
default => ()


julia> dispatch(dtup, Foo())
julia> dtup[Foo()]
(1, 2)

julia> dispatch(dtup, Bar())
julia> dtup[Bar()]
(3,)

julia> dispatch(dtup, Baz())
julia> dtup[Baz()]
()
```
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ dtup = DispatchedTuple((
Pair(Bar(), 3),
))
dispatch(dtup, Foo()) # returns (1, 2)
dispatch(dtup, Bar()) # returns (3,)
dispatch(dtup, Baz()) # returns ()
dtup[Foo()] # returns (1, 2)
dtup[Bar()] # returns (3,)
dtup[Baz()] # returns ()
nothing
```

Expand Down

0 comments on commit ca95935

Please sign in to comment.