Erlang (programming language)



         


Erlang is a general-purpose concurrent programming language and runtime system. The sequential sub-set of Erlang is a functional language, with strict evaluation, single assignment and dynamic typing.

Named after A. K. Erlang and at the same time abbreviation for ERicsson LANGuage, it was developed at Ericsson for use in telecommunication hardware. It was designed to support distributed, fault-tolerant, soft-real-time, non-stop applications. Since its release as open source in 1998, it became used by companies world-wide, including Nortel and T-Mobile.

Code looks like this:

-module(fact). -export([fac/1]). fac(0) -> 1; fac(N) -> N * fac(N-1).

A Quicksort example taken from here

%% quicksort(List,CmpFun) %% Sort a list of items using a user-specified %% comparison function quicksort([],_) -> []; quicksort([Pivot|Rest],CmpFun) -> quicksort([ X || X <- Rest, CmpFun(X,Pivot)],CmpFun) ++ [Pivot] ++ quicksort([ Y || Y <- Rest, CmpFun(Pivot,Y)],CmpFun).

See also: Erlang unit

[Top]




  View Live Article   This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License