This is a mirror of official site: http://jasper-net.blogspot.com/

Ela, functional language

| Thursday, February 10, 2011
Project Description

Ela is dynamically (and strongly) typed and comes with a rich and extensible type system out of box. It provides an extensive support for the functional programming paradigm including but not limited to - first class functions, first class currying and composition, list/array comprehensions, pattern matching, polymorphic variants, thunks, etc. It also provides some imperative programming features.

Ela supports both strict and non-strict evaluation but is strict by default.

The current language implementation is a light-weight and efficient interpreter written fully in C#. The interpreter was designed to be embeddable and has a clear and straightforward API. The language comes with a command line utility (Ela Console) that supports interactive mode.

Code samples in Ela

Quick sort:

let quickSort x::xs = quickSort [ y @ y <- xs | y < x ]
                     ++ [x] ++ quickSort [ y @ y <- xs | y >= x];
             []    = []


Fibonacci:

let fib = fib' 0 1
         where fib' a b 0 = a;
                    a b n = fib' b (a + b) (n - 1)
         end            

Read more: Codeplex

Posted via email from Jasper-net

0 comments: