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
FP (programming language)
(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!
== Overview == The '''values''' that FP programs map into one another comprise a [[set (abstract data type)|set]] which is [[closure (mathematics)|closed]] under '''sequence formation''': if '''x'''<sub>1</sub>,...,'''x'''<sub>n</sub> are '''values''', then the '''sequence''' γ'''x'''<sub>1</sub>,...,'''x'''<sub>n</sub>γ is also a '''value''' These values can be built from any set of atoms: booleans, integers, reals, characters, etc.: '''boolean''' : {'''T''', '''F'''} '''integer''' : {0,1,2,...,β} '''character''' : {'a','b','c',...} '''symbol''' : {'''x''','''y''',...} '''β₯''' is the '''undefined''' value, or '''bottom'''. Sequences are ''bottom-preserving'': γ'''x'''<sub>1</sub>,...,'''β₯''',...,'''x'''<sub>n</sub>γ = '''β₯''' FP programs are ''functions'' '''f''' that each map a single ''value'' '''x''' into another: '''f''':'''x''' represents the '''value''' that results from applying the '''function''' '''f''' to the '''value''' '''x''' Functions are either primitive (i.e., provided with the FP environment) or are built from the primitives by '''program-forming operations''' (also called '''functionals'''). An example of primitive function is '''constant''', which transforms a value '''x''' into the constant-valued function '''xΜ'''. Functions are [[strict function|strict]]: '''f''':'''β₯''' = '''β₯''' Another example of a primitive function is the '''selector''' function family, denoted by '''1''','''2''',... where: '''''i''''':γ'''x'''<sub>1</sub>,...,'''x'''<sub>n</sub>γ = '''x'''<sub>i</sub> if 1 β€ '''''i''''' β€ n = β₯ otherwise
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)