Duplicate. Here’s my answer.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Should I dispatch on singleton types or their instances? | 6 | 1375 | September 1, 2019 | |
| Match a type or an instance of it | 2 | 319 | July 22, 2020 | |
| What is the diffence between abstract type and singleton type | 4 | 572 | February 8, 2023 | |
| Dispatch on type only | 4 | 709 | August 16, 2021 | |
| f(x::MyType{T, S}) where (T || S) <: Foo? | 15 | 454 | December 14, 2022 |