Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Type theory
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
==== Lambda terms ==== New function terms may be constructed using [[Lambda calculus#Definition|lambda expression]]s, and are called lambda terms. These terms are also defined inductively: a lambda term has the form <math>(\lambda v .t)</math>, where <math>v</math> is a formal variable and <math>t</math> is a term, and its type is notated <math>\sigma\to\tau</math>, where <math>\sigma</math> is the type of <math>v</math>, and <math>\tau</math> is the type of <math>t</math>.<ref name=":1" /> The following lambda term represents a function which doubles an input natural number. <math>(\lambda x.\mathrm{add}\,x\,x): \mathsf{nat}\to\mathsf{nat}</math> The variable is <math> x</math> and (implicit from the lambda term's type) must have type <math> \mathsf{nat} </math>. The term <math> \mathrm{add}\,x\,x</math> has type <math> \mathsf{nat} </math>, which is seen by applying the function application inference rule twice. Thus, the lambda term has type <math>\mathsf{nat}\to\mathsf{nat}</math>, which means it is a function taking a natural number as an [[Argument of a function|argument]] and returning a natural number. A lambda term is often referred to{{efn|name= anon|1= In [[Julia (programming language)|Julia]], for example, a function with no name, but with two parameters in some tuple (x,y) can be denoted by say, <code>(x,y) -> x^5+y</code>, as an anonymous function.<ref name=balbaert > Balbaert,Ivo [https://www.oreilly.com/library/view/getting-started-with/9781783284795/ch03s03.html (2015) Getting Started with Julia]</ref>}} as an [[anonymous function]] because it lacks a name. The concept of anonymous functions appears in many programming languages.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Type theory
(section)
Add topic