Skip to content
Lisp Flavoured Erlang (LFE)
Erlang Emacs Lisp Shell Other
Latest commit 0f3ef8e May 2, 2016 @rvirding Fix read function to handle multi-line tokens
The new read is not line based which can cause unexpected behaviour so
also add read_line which is line oriented. The shell uses read_line.
Failed to load latest commit information.
bin Simplify/normalize lfe_doc and fix prop_lfe_doc Apr 24, 2016
c_src Fix type cast error Nov 4, 2015
dev Move visual "tests to dev and update .travis.yml Apr 24, 2016
doc Fix read function to handle multi-line tokens May 2, 2016
emacs Add deftest keywords for special handling Apr 22, 2016
examples Convert to use comma/comma-at instead of unquote/unquote-splicing Sep 9, 2015
include Added dolist macro that wraps lists:foreach. Nov 14, 2015
src Fix read function to handle multi-line tokens May 2, 2016
test Make the lfe_doc module interface more consistent with other modules Apr 26, 2016
.dockerignore Added initial Docker files. Dec 6, 2014
.gitignore Add missing specs to lfe_doc and clean up tests Apr 12, 2016
.travis.yml Don't test R15B with Travis Apr 26, 2016
Dockerfile Updated to the latest Erlang release. Mar 27, 2016
Emakefile Fix Makefile and add Emakefile and May 27, 2010
LICENSE Convert to use Apache License, Version 2.0 Feb 12, 2013
Makefile Simplify/normalize lfe_doc and fix prop_lfe_doc Apr 25, 2016 Add Travis badge to Apr 24, 2016
VERSION Add docs string element to define-function/macro core form Mar 27, 2016
get_maps_opts.escript Rewrite to generate HAS_FULL_KEYS macro correctly Aug 9, 2015
rebar.config Simplify/normalize lfe_doc and fix prop_lfe_doc Apr 25, 2016
rebar.config.script Rewrite to generate HAS_FULL_KEYS macro correctly Aug 9, 2015
rebar.lock Add PropEr tests to lfe_doc Apr 12, 2016


Travis version downloads weekly downloads daily downloads

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.


To compile LFE, simple clone it and compile:

    $ git clone
    $ cd lfe
    $ make compile

LFE requires Erlang be installed on the system and that the erl binary is in $PATH.


Should you wish to have LFE available system-wide, you can run the following make target:

    $ 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.

Note that the installation target will also install the LFE man pages in the appropriate /usr/local/man/man* directories.


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

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

    LFE Shell V6.0 (abort with ^G)

If you have installed LFE, then you may start the REPL from any location:

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

    LFE Shell V6.0 (abort with ^G)

Likewise, you may run an LFE shell script in the same style as shell scripts with:

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


    $ 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.


Files with more technical details:

If you would like to make changes to the LFE documentation and then regenerate the docs, you'll want to read the instructions here:

Something went wrong with that request. Please try again.