Gleam is a statically typed functional programming language for building scalable concurrent systems.

It compiles to Erlang and has straightforward interop with other BEAM languages such as Erlang, Elixir and LFE.

It looks like this:

pub type Tree(value) {
  Branch(Tree(value), Tree(value))

pub fn any(tree: Tree(a), check: fn(a) -> Bool) -> Bool {
  case tree {
    Leaf(i) -> check(i)
    Branch(left, right) -> any(left, check) || any(right, check)

pub fn has_even_leaf(tree: Tree(Int)) -> Bool {
  any(tree, fn(i) {
    i % 2 == 0

The source code can be found at

For Gleam chat we have the IRC channel #gleam-lang on Freenode.


Gleam is made possible by its sponsors. A special thanks to these people who sponsor Gleam development for $20 or more, thank you!

If you would like to support Gleam please consider sponsoring the project.