Skip to content
A statically typed language for the Erlang VM
Branch: master
Clone or download
Latest commit 53725df Apr 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Circle CI (#99) Mar 12, 2019
book Alpaca FAQ Apr 19, 2019
docs Alpaca FAQ Apr 19, 2019
experiments Split out OTP lib Mar 30, 2019
gleam Correct unknown token error diagnostic Apr 19, 2019
gleam_stdlib map:take Apr 18, 2019
.gitattributes Mark generated files as generated Apr 18, 2019
CHANGELOG.md Error messages display file path Apr 16, 2019
CODE_OF_CONDUCT.md
CONTRIBUTING.md Erlang installation instructions Mar 12, 2019
LICENCE Apache 2.0 licence Jan 31, 2018
Makefile Remove gleam dep for install Apr 5, 2019
README.md Mark generated files as generated Apr 18, 2019

README.md

Gleam

build

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.

pub enum Tree =
  | Leaf(Int)
  | Node(Tree, Tree)

pub fn any(tree, predicate) {
  case tree {
  | Leaf(i) -> predicate(i)
  | Node(left, right) -> any(left, predicate) || any(right, predicate)
  }
}

pub fn has_even_leaf(tree) {
  any(tree, fn(i) {
    i % 2 == 0
  })
}

For more information see the Gleam website: https://gleam.run.

You can’t perform that action at this time.