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
Lambda calculus
(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!
=== Named constants === In lambda calculus, a [[library (computing)|library]] would take the form of a collection of previously defined functions, which as lambda-terms are merely particular constants. The pure lambda calculus does not have a concept of named constants since all atomic lambda-terms are variables, but one can emulate having named constants by setting aside a variable as the name of the constant, using abstraction to bind that variable in the main body, and apply that abstraction to the intended definition. Thus to use {{Mono|''f''}} to mean ''N'' (some explicit lambda-term) in ''M'' (another lambda-term, the "main program"), one can say : {{Mono|(Ξ»''f''.}}''M''{{Mono|)}} ''N'' Authors often introduce [[syntactic sugar]], such as {{Mono|let}},{{efn|{{Mono|(Ξ»''f''.}}''M''{{Mono|)}} ''N'' can be pronounced "let f be N in M".}} to permit writing the above in the more intuitive order : {{Mono|1=let ''f'' =}} ''N'' {{Mono|in}} ''M'' By chaining such definitions, one can write a lambda calculus "program" as zero or more function definitions, followed by one lambda-term using those functions that constitutes the main body of the program. A notable restriction of this {{Mono|let}} is that the name {{Mono|''f''}} may not be referenced in ''N'', for ''N'' is outside the scope of the abstraction binding {{Mono|''f''}}, which is ''M''; this means a recursive function definition cannot be written with {{Mono|let}}. The {{Mono|letrec}}{{efn|name=ariola|1= Ariola and Blom<ref name= AB94 /> employ 1) axioms for a representational calculus using ''well-formed cyclic lambda graphs'' extended with {{Mono|letrec}}, to detect possibly infinite unwinding trees; 2) the representational calculus with Ξ²-reduction of scoped lambda graphs constitute Ariola/Blom's cyclic extension of lambda calculus; 3) Ariola/Blom reason about strict languages using [[#callByValue|Β§ call-by-value]], and compare to Moggi's calculus, and to Hasegawa's calculus. Conclusions on p. 111.<ref name= AB94 >Zena M. Ariola and Stefan Blom, ''Proc. TACS '94'' Sendai, Japan 1997 [http://ix.cs.uoregon.edu/~ariola/cycles.pdf (1997) Cyclic lambda calculi] 114 pages.</ref>}} construction would allow writing recursive function definitions, where the scope of the abstraction binding {{Mono|''f''}} includes ''N'' as well as ''M''. Or self-application a-la that which leads to {{Mono|'''Y'''}} combinator could be used.
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)