# Functor abstract types

**URL:** <https://discourse.julialang.org/t/functor-abstract-types/4887>\
**Category:** General Usage\
**Tags:** question, type, functors\
**Created:** [July 16, 2017, 8:46pm UTC](https://discourse.julialang.org/t/functor-abstract-types/4887 "2017-07-16T20:46:34Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![scelles](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scelles/32/220408_2.png) [@scelles](https://discourse.julialang.org/u/scelles)\
**Post date:** [November 6, 2017, 8:54am UTC](https://discourse.julialang.org/t/functor-abstract-types/4887/8 "2017-11-06T08:54:09Z")

</div>

Wikipedia have an interesting article about “function object” (often called functor)

> **[Function object](https://en.wikipedia.org/wiki/Function_object)**
>
> In computer programming, a function object\[a\] is a construct allowing an object to be invoked or called as if it were an ordinary function, usually with the same syntax (a function parameter that can also be a function). Function objects are often called functors.
> A typical use of a function object is in writing callback functions. A callback in procedural languages, such as C, may be performed by using function pointers. However it can be difficult or awkward to pass a state into or out of the ...

Otherwise there is no example for Julia.

Maybe someone could provide an example there?

I also noticed that [https://github.com/lindahua/NumericFuns.jl](https://github.com/lindahua/NumericFuns.jl) provide functors… but it’s broken with Julia 0.6 see [https://github.com/lindahua/NumericFuns.jl/issues/9](https://github.com/lindahua/NumericFuns.jl/issues/9)  
Any news about it?

PS: Sorry, I should have post there [https://discourse.julialang.org/t/help-defining-functor-type/](https://discourse.julialang.org/t/help-defining-functor-type/)

---

_[View the full topic](https://discourse.julialang.org/t/functor-abstract-types/4887)._
