Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ julia> Base.infer_return_type(improved, Tuple{NTuple{5, Any}}) # the return typ
NTuple{5, Int64}
```

NB: `typed_callable(Int, Int)` actually only consists of types already present in
`Base` Julia, so it's just a nicer interface for functionality that already comes
with Julia:

```julia-repl
julia> typed_callable(Int, Int)
Base.Fix2{typeof(typeassert), Type{Int64}}(typeassert, Int64) ∘ Int64
```

The three-argument version of `typed_callable` depends on a type defined in this
package, though.

### Use case 2: dispatch on callables with a certain type signature (kind of)

This is what many newcomers to Julia ask for, especially when coming from a
Expand Down