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> methods(foo) # 1 method for generic function "foo":  foo(::Core.IntrinsicFunction) in Main at REPL: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
Is there a way to achieve the same behaviour with
IntrinsicFunctions as with regular functions?