Function object: Difference between revisions

Content deleted Content added
NWOtypo (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit
add context to sentence introducing term "functor" in lead
Line 1:
{{About|the computer programming concept of function objects|functors in mathematics|Functor|the related concept in functional programming|Functor (functional programming)}}
{{Refimprove|date=February 2009}}
In [[computer programming]], a '''function object'''{{efn|1=In C++, a '''functionoid''' is an object that has one major method, and a '''functor''' is a special case of a functionoid.<ref>[https://isocpp.org/wiki/faq/pointers-to-members#functor-vs-functionoid What's the difference between a functionoid and a functor?]</ref> They are similar to a function object, ''but not the same''.}} is a construct allowing an [[object (computer science)|object]] to be invoked or called as if it were an ordinary [[subroutine|function]], usually with the same syntax (a function parameter that can also be a function). FunctionIn some languages, particularly C++, function objects are often called '''functors''' (not related to [[Functor (functional programming)|the functional programming concept]]).
 
== Description ==