# Dispatch on Core.IntrinsicFunction

**URL:** <https://discourse.julialang.org/t/dispatch-on-core-intrinsicfunction/95814>\
**Category:** General Usage\
**Created:** [March 9, 2023, 6:05pm UTC](https://discourse.julialang.org/t/dispatch-on-core-intrinsicfunction/95814 "2023-03-09T18:05:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![willtebbutt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/willtebbutt/32/6790_2.png) [@willtebbutt](https://discourse.julialang.org/u/willtebbutt)\
**Post date:** [March 9, 2023, 6:05pm UTC](https://discourse.julialang.org/t/dispatch-on-core-intrinsicfunction/95814/1 "2023-03-09T18:05:39Z")

</div>

Consider

```julia
foo(::typeof(Core.Intrinsics.add_float)) = "add two floats"
foo(::typeof(Core.Intrinsics.add_int)) = "add two ints"

```

If you ask what methods of `foo` are available, you’ll see

```julia
julia> methods(foo)
# 1 method for generic function "foo":
[1] foo(::Core.IntrinsicFunction) in Main at REPL[3]:1

```

because (AFAICT) all the functions in `Core.Intrinsics` are of the same type – `Core.IntrinsicFunction`. This is different from your usual functions, for which the above would produce methods of `foo` specific to `add_float` and `add_int`.

Is there a way to achieve the same behaviour with `IntrinsicFunction`s as with regular functions?
