Functional Programming
Le Functional Programming, abrégé FP, est un langage créé par John Backus en 1977 dans son article Can programming be liberated from the von Neumann style ? : a functional style and its algebra of programs , en français : « La programmation peut-elle se libérer du style de von Neumann ? : un style fonctionnel et son algèbre des programmes ».
La fonction factorielle s'y écrit :
Def fact = eq0 -> ~1 ; * o [ id, fact o sub1 ]
avec :
Def eq0 = eq o [ id, ~0 ]
Def sub1 = - o [ id, ~1 ]
Vue d'ensemble
Il existe plusieurs types de valeurs atomiques : booléens, entiers (positifs), caractères, symboles...
Étant donné des valeurs x1, …, xn, la suite <x1, …, xn> est elle-même une valeur pour le langage.
⊥ (« antitruc ») est la valeur « indéfini » ; elle est absorbante par formation de suite : si une suite comporte la valeur ⊥, alors elle est évaluée à ⊥.
Une fonction f transforme une valeur x en une autre, dénotée f:x.
Toute fonction est stricte (en), c'est-à-dire que si x s'évalue à ⊥, alors f:x = ⊥.
Fonctionnelles
Une fonctionnelle est une fonction opérant sur d'autres fonctions.
Exemples :
unit;composition;construction;condition;apply-to-all;insert-right;insert-left.
Voir aussi
Bibliographie
- (en) Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs, John Backus
- (en) Hague, James (December 28, 2007). "Functional Programming Archaeology". Programming in the Twenty-First Century.
- (en) Sacrificing simplicity for convenience: Where do you draw the line?, John H. Williams and Edward L. Wimmers, IBM Almaden Research Center
- (en) Systems programming in the functional language FP, Jin Lingzi & Zhu Hong, Journal of Computer Science and Technology, 1988.
Liens externes
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.
