Share your repls and programming experiences

← Back to all posts
tjgr (2)

Lang is a functional programming language with static types. It uses a
modern, s-expression syntax and compiles to Java classfiles.

Lang aims to be a language fusing the ease of development found in
Clojure, the type safety found in Haskell and the data extensibility
found in PureScript.


Lang is a joint effort by @tjgr and @fazzone. The team repl is located at


  • lambdas
  • argument capture
  • algebraic data types
  • type inference
  • modules
  • arbitrary precision arithmetic
  • macros
  • macros that actually work
  • labelled arguments
  • typeclasses
  • superclass constraints
  • lenses
  • sum and product types
  • structural records and variants
  • JVM code generation
  • Java interop
  • Emacs mode
  • powerful standard library
  • REPL
  • effect system

As you can see, there is plenty of work to be done. If you would like
to see any of the missing features completed, or any features not
mentioned here at all, our policy is "PRs welcome!".


Option type with map and lambda

(defmodule examples.option
  (:import [ :as io]
           [lang.string :as string]))
(deftype (Option T)
  (| [:none]
     [:some T]))

(defn default
  [option fallback]
  (match option
    [:none] fallback
    [:some value] value))

(defn map
  [f option]
  (match option
    [:none] [:none]
    [:some value] [:some (f value)]))
(defn main
  [argv : (Array String)]
      (map (fn [x] (string/concat x ", world!")) [:some "Hello"])

Installation & usage

The following requires git, a recent JDK and leiningen:

$ git clone

$ cd lang

$ lein uberjar

$ export LANG_HOME=`pwd`/std

$ ./lang signature std/lang/option.lang
  type (Option T)
  default : (∀ α (-> (Option α) α α))
$ ./lang compile examples/option.lang

$ java -cp out examples.option

Code of Conduct

Don't be a jerk. Seriously.

TheDrone7 (1777)

Hello there! The jam required you to work as a team of at least 2 people and submit a team repl. I see that you have submitted a personal repl instead.

If you have a team and team members, please edit the post description to include them.

Thank you.

tjgr (2)

@TheDrone7: Thanks, added a "Team" section.

TheDrone7 (1777)

@tjgr Could you do me another favor and re-clone the GitHub repository to the repl. We seemed to have run into some issues when you cloned it and therefore, the repl is broken.

Sorry for this inconvenience.

tjgr (2)

@TheDrone7 I think I see what you mean. I cloned it again, but it breaks after setting the repl type to Clojure.

TheDrone7 (1777)

@tjgr I see, I'll let the devs know in that case.