Content deleted Content added
Line 13:
'''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''').
==Functionals==
'''constant''' '''x̄''' where '''x̄''':'''y''' = '''x'''▼
These are are the principal functionals of FP:
and '''x̄''':'''⊥''' = '''⊥'''
'''composition''' '''f'''&#x°'''g''' where '''f'''&#x°'''g''':'''x''' = '''f''':('''g''':'''x''')
Line 30 ⟶ 32:
'''insert-right''' /'''f''' where /'''f''':⟨'''x'''⟩ = '''x'''
and /'''f''':⟨'''x'''<sub>1</sub>,'''x'''<sub>2</sub>,...,'''x'''<sub>n</sub>⟩ = '''f''':⟨'''x'''<sub>1</sub>,/'''f''':⟨'''x'''<sub>2</sub>,...,'''x'''<sub>n</sub>⟩⟩
'''insert-left''' \'''f''' where \'''f''':⟨'''x'''⟩ = '''x'''
and \'''f''':⟨'''x'''<sub>1</sub>,'''x'''<sub>2</sub>,...,'''x'''<sub>n</sub>⟩ = '''f''':⟨\'''f''':⟨'''x'''<sub>1</sub>,...,'''x'''<sub>n-1</sub>⟩,'''x'''<sub>n</sub>⟩
[[es:FP (lenguaje de programación)]]
|