Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Lisp Flavoured Erlang (LFE)
Erlang Emacs Lisp Shell Other

Fix input and printing for list strings and binary strings

These both now support unicode for input and printing.
latest commit 469a3e4e9f
@rvirding authored
Failed to load latest commit information.
bin Fix indentation issues and MAKE NO CODE CHANGES
c_src c_src/lfeexec.c: Correctly size the buffer used for the path name.
doc Fix indentation issues and MAKE NO CODE CHANGES
ebin Looks like a module was removed (automatically?).
emacs Define basic forms in a defconst for font handling
examples Added process analog.
include Replaced tabs with spaces.
src Fix input and printing for list strings and binary strings
test Add special syntax #"åäö" for utf-8 encoded binary strings
.dockerignore Added initial Docker files.
.gitignore Update list of ignored files
.travis.yml Update OTP releases
Dockerfile More Dockerfile updates:
Emakefile Fix Makefile and add Emakefile and
LICENSE Convert to use Apache License, Version 2.0
Makefile Rewrite to generate HAS_FULL_KEYS macro correctly Updated to show the REPL for the Erlang Solutions image.
VERSION Update development version number
get_maps_opts.escript Rewrite to generate HAS_FULL_KEYS macro correctly
package.exs Upgrade versions to 0.10.0-dev
rebar.config Add rebar.config.script to do conditional define of HAS_MAPS macro
rebar.config.script Rewrite to generate HAS_FULL_KEYS macro correctly


LFE, Lisp Flavoured Erlang, is a lisp syntax front-end to the Erlang compiler. Code produced with it is compatible with "normal" Erlang code. An LFE evaluator and shell is also included.


LFE can be installed in different ways depending on how it is intended to be used:

  • use lfetool to create projects (which will automatically have LFE as a dependency when it creates skeleton libraries, OTP apps, etc.; or
  • use LFE directly in a working dir, e.g.:
    $ git clone
    $ cd lfe
    $ make compile

The second alternative compiles all the files. After this has been done programs for starting the REPL and compiling LFE files can be installed with:

    $ make install

By default this will create the programs lfe, lfec and lfescript in the same directory as the erl program. This can changed by defining the make variable DESTBINDIR to point to the desired directory. So:

    $ make install DESTBINDIR=/Users/rv/bin

will put the programs in /Users/rv/bin.


If you have used lfetool to set up your project, you can simply do this to start a REPL:

    $ make shell
    Erlang 17 (erts-6.0) [source] [64-bit] [smp:8:8] ...

    LFE Shell 6.0 (abort with ^G)

Note that this will recompile all the deps (often useful for projects with changing dependencies). If you would prefer to only recompile code for the project itself, you can use make shell-no-deps instead.

If you're running LFE from a git clone working dir, you can start the REPL like so:

    $ lfe
    Erlang 17 (erts-6.0) [source] [64-bit] [smp:8:8] ...

    LFE Shell V6.0 (abort with ^G)

and run an LFE shell script in the same style as shell scripts with:

    $ lfe script-name script-arg-1 ...


The docs site has several places to explore that will show you how to start using LFE. However, here's a quick taste:

  • start up an LFE REPL as demonstrated above
  • then, do something like this:
    > (* 2 (+ 1 2 3 4 5 6))
    > (* 2 (lists:foldl #'+/2 0 (lists:seq 1 6)))

Docker Support

LFE now supports Docker. To get started, simply do the following, once you have Docker set up on your machine:

$ docker pull lfex/lfe

Alternatively, you could build the image yourself:

$ cd lfe
$ docker build .

Here are a couple of simple usage examples:

$ docker run lfex/lfe

$ docker run -i -t lfex/lfe lfe
Erlang/OTP 18 [erts-7.0] [source-4d83b58] [64-bit] [smp:8:8] ...

LFE Shell V7.0 (abort with ^G)

That last command will dump you into the LFE REPL on a running container of the lfex/lfe Docker image. For more information on using Docker with LFE, be sure to read the tutorial.


Classic Docs

Files with more technical details:

Something went wrong with that request. Please try again.