Skip to content

Commit 99a745c

Browse files
authored
expand README (#4)
1 parent 0f363ed commit 99a745c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ julia> Base.infer_return_type(improved, Tuple{NTuple{5, Any}}) # the return typ
9696
NTuple{5, Int64}
9797
```
9898

99+
NB: `typed_callable(Int, Int)` actually only consists of types already present in
100+
`Base` Julia, so it's just a nicer interface for functionality that already comes
101+
with Julia:
102+
103+
```julia-repl
104+
julia> typed_callable(Int, Int)
105+
Base.Fix2{typeof(typeassert), Type{Int64}}(typeassert, Int64) ∘ Int64
106+
```
107+
108+
The three-argument version of `typed_callable` depends on a type defined in this
109+
package, though.
110+
99111
### Use case 2: dispatch on callables with a certain type signature (kind of)
100112

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

0 commit comments

Comments
 (0)