Lisp Flavored Erlang

LFE project maintained by Robert Virding Hosted on GitHub @ rvirding/lfe
LFE docs maintained by Duncan McGreggor Hosted on GitHub @ lfe/

Nothing Quite Compares...

...To the taste of Erlang, aged in the oaken barrels of Lisp, served at a temperature of perfect hotness. New to LFE? Check out our Quick Start guide!

LFE -- Lisp Flavoured Erlang -- a Lisp syntax front-end to the Erlang compiler. LFE is a Lisp-2, like Common Lisp, and comes with a REPL (shell) for use with interactive coding.

LFE-based projects coexist seamlessly with Core Erlang and OTP. As such, code written in LFE can freely be used together with modules written in other BEAM languages such as Erlang and Elixir.

LFE Features

We have a Features page, but here are some of the highlights:


Build Projects with LFE... or Install it

LFE installation isn't recommended. Instead, one should:

    $ lfetool new library my-lib
    $ ls -al my-lib/deps/lfe


    $ git clone
    $ cd lfe
    $ git checkout develop
    $ make compile

If you really do want to install LFE (master branch) system-wide, you can do so like this:

    $ lfetool install lfe


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

    $ lfetool repl lfe

If you want to compile your source code before you start the repl, you can use this command:

    $ make shell

Both of those commands will set ERL_LIBS to the dirs of all your declared and downloaded dependencies.

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

    $ ./bin/lfe -pa ./ebin

Note that if you want access to your dependencies and have started the REPL manually, you will need to either tack them on with additional -pa parameters or you'll want to define ERL_LIBS.


Here's a quick taste:

    > (* 2 (+ 1 2 3 4 5 6))
    > (* 2 (lists:foldl (lambda (n acc) (+ n acc)) 0 (lists:seq 1 6)))

Cool! How do I start?

LFE documentation is maintained in the source code in the doc directory. There is also a wiki with some excellent content presented there. However, the site you are currently reading is attempting to provide a gentler and more verbose introduction to Lisp Flavored Erlang. We aim to accomplish this in two important ways:

A final resource for the curious and motivated is available in the examples directory of the project repo. Each sample provides functioning code that shows how to use LFE in larger contexts.