# Type inference for a singleton of type Function

**URL:** <https://discourse.julialang.org/t/type-inference-for-a-singleton-of-type-function/46544>\
**Category:** New to Julia\
**Created:** [September 13, 2020, 11:17am UTC](https://discourse.julialang.org/t/type-inference-for-a-singleton-of-type-function/46544 "2020-09-13T11:17:58Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [September 13, 2020, 12:43pm UTC](https://discourse.julialang.org/t/type-inference-for-a-singleton-of-type-function/46544/7 "2020-09-13T12:43:01Z")

</div>

A more deep reasoning can be found here:

> [@What is typeof(fun)?](https://discourse.julialang.org/t/what-is-typeof-fun/33523):
>
> when I methods(Base.map), I see something like: [1] map(::typeof(zero), A::BitArray) in Base at bitarray.jl:1659 what is typeof(zero)? indeed, I found that: julia\> f(x) = 2x f (generic function with 1 method) julia\> typeof(f) typeof(f) julia\> typeof(f) \<: Function true julia\> typeof(f) isa DataType true julia\> f isa Function true it’s quite strange to me: why typeof(f) not return Function? official docs mentions nothing about it.

---

_[View the full topic](https://discourse.julialang.org/t/type-inference-for-a-singleton-of-type-function/46544)._
