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

modifier

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 à ⊥.

<x1, …, ⊥, …, xn> = ⊥

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

modifier

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

modifier

Bibliographie

modifier

Liens externes

modifier

📚 Artikel Terkait di Wikipedia

Suite de Fibonacci

de la factorielle. (en) Antony J. T. Davie, Introduction to Functional Programming Systems Using Haskell, Cambridge University, coll. « Cambridge Computer

John Backus

remise du prix Turing. Ce discours, « Can programming be liberated from the von Neumann style? : a functional style and its algebra of programs » (« La

Liste de langages de programmation

(programming language) (en) AIS Balise Aikido Alef Algebraic Logic Functional programming language (en) Algol 60 Algol 68 Algol W Alice (programming language) (en)

Caml

Aspect-oriented Functional Programming Language », Proceedings of the ACM SIGPLAN International Conference on Functional Programming (ICFP), vol. 40,

Programmation fonctionnelle

auxquels il faut ajouter XSLT et Anubis. (en) « Functional Programming » « Functional vs. Procedural Programming Language », sur web.archive.org, 13 novembre

Théorie des langages de programmation

Principles of Programming Languages (POPL), Programming Language Design and Implementation (PLDI), l'International Conference on Functional Programming (ICFP)

Lisp

extensions compatibles Common Lisp. (en) D. A. Kent « Some History of Functional Programming Languages » (12) (lire en ligne) [PDF] —TFP12 (lire en ligne)

Nix (gestionnaire de paquets)

Purely Functional Linux Distribution » (Septembre 2008) (lire en ligne) —ICFP 2008: 13th ACM SIGPLAN International Conference on Functional Programming « Nixpkgs