Programación Funcional

EJEMPLOS

A continuación veremos algunos ejemplos en los diferentes lenguajes de programación funcional



HOLA MUNDO

Clojure

Haskell

Scala

Lisp

Ocaml

Scheme

Erlang

FIBONACCI

Clojure

Haskell

Scala

Lisp

Ocaml

Scheme

Erlang

JavaScript

Python

R


Ejemplo en Kotlin


Kotlin

Funciones puras

Clojure

Haskell

Scala

Lisp

Ocaml

Scheme

Erlang


Ruby

Funciones anónimas

Clojure

Haskell

Scala

Lisp

Ocaml

Scheme

Erlang


Python


R

Funciones de orden superior


Ruby

Currying


Ruby




R

Procs


Ruby

Functor lista


Python


Functor función


Python

Caso de uso


Python

Effect tracking


Python

Operadores como funciones


R

Vectorización


R