Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
First-class function
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Type theory == {{main|Function type}} In [[type theory]], the type of functions accepting values of type ''A'' and returning values of type ''B'' may be written as ''A'' → ''B'' or ''B''<sup>''A''</sup>. In the [[Curry–Howard correspondence]], [[function type]]s are related to [[logical implication]]; lambda abstraction corresponds to discharging hypothetical assumptions and function application corresponds to the [[modus ponens]] inference rule. Besides the usual case of programming functions, type theory also uses first-class functions to model [[associative array]]s and similar [[data structure]]s. In [[category theory|category-theoretical]] accounts of programming, the availability of first-class functions corresponds to the [[closed category]] assumption. For instance, the [[simply typed lambda calculus]] corresponds to the internal language of [[Cartesian closed category|Cartesian closed categories]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)