Ivy
Ivy is a statically typed functional programming language. Friendly enough for beginners, robust enough for experienced programmers.
Ivy is still a work-in-progress. Stay tuned for more!
Source code: https://github.com/gtr/ivy.
type Tree<a> =
| Empty
| Node(a, Tree<a>, Tree<a>);
fn map :: (a -> b) -> Tree<a> -> Tree<b>;
fn map(f, Empty) => Empty;
fn map(f, Node(x, l, r)) => Node(f(x), map(f, l), map(f, r));
fn sum :: Tree<Int> -> Int;
fn sum(Empty) => 0;
fn sum(Node(x, l, r)) => x + sum(l) + sum(r);
let tree = Node(1, Node(2, Empty, Empty), Node(3, Empty, Empty));
let sum_of_squares = sum(map(fn (x) => x * x, tree));
-- Prints "Sum of squares: 14"
println("Sum of squares: " ++ show(sum_of_squares));