Skip to content
vic

lfe/lfe

Lisp Flavoured Erlang (LFE)

lfe/lfe.json
{
"createdAt": "2008-08-19T23:46:18Z",
"defaultBranch": "develop",
"description": "Lisp Flavoured Erlang (LFE)",
"fullName": "lfe/lfe",
"homepage": "",
"language": "Erlang",
"name": "lfe",
"pushedAt": "2025-11-26T16:57:03Z",
"stargazersCount": 2400,
"topics": [],
"updatedAt": "2025-11-26T16:56:57Z",
"url": "https://github.com/lfe/lfe"
}

Build Status Hex.pm version Hex.pm downloads Hex.pm weekly downloads Hex.pm 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:

Terminal window
$ git clone https://github.com/lfe/lfe.git
$ cd lfe
$ make compile

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

To run the full suite of tests for LFE, simply use the following:

Terminal window
make tests

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

Terminal window
$ make install

By default this will create the programs lfe, lfec, lfedoc and lfescript in /usr/local/bin. This can be changed by defining the make variable PREFIX to point to the desired parent directory.

Note that the install target will also install the LFE man pages in the appropriate $(PREFIX)/share/man/man* directories. This can be changed by defining the make variable MANINSTDIR to point to the desired top man directory.

So:

Terminal window
$ make install PREFIX=/Users/rv/ MANINSTDIR=/Users/rv/man

will put the programs in /Users/rv/bin and the man pages in the /Users/rv/man/man* directories.

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

Terminal window
$ ./bin/lfe
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit] [dtrace]
..-~.~_~---..
( \\ ) | A Lisp-2+ on the Erlang VM
|`-.._/_\\_.-': | Type (help) for usage info.
| g |_ \ |
| n | | | Docs: http://docs.lfe.io/
| a / / | Source: http://github.com/lfe/lfe
\ l |_/ |
\ r / | LFE v2.2.1 (abort with ^G)
`-E___.-'
lfe>

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

Terminal window
$ lfe

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

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

or

Terminal window
$ 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:
lfe> (* 2 (+ 1 2 3 4 5 6))
42
lfe> (* 2 (lists:foldl #'+/2 0 (lists:seq 1 6)))
42

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

Terminal window
$ docker pull lfex/lfe

Alternatively, you could build the image yourself:

Terminal window
$ cd lfe
$ docker build .

To bring up the LFE REPL:

Terminal window
$ docker run -it lfex/lfe
  • Quick Start
  • LFE [user guide]!(doc/user_guide.txt)
  • [version history]!(doc/src/version_history.md)

Files with more technical details:

  • [lfe.txt]!(doc/lfe.txt)
  • [lfescript.txt]!(doc/lfescript.txt)
  • [lfe_bits.txt]!(doc/lfe_bits.txt)
  • [lfe_clj.txt]!(doc/lfe_clj.txt)
  • [lfe_comp.txt]!(doc/lfe_comp.txt)
  • [lfe_docs.txt]!(doc/lfe_docs.txt)
  • [lfe_gen.txt]!(doc/lfe_gen.txt)
  • [lfe_io.txt]!(doc/lfe_io.txt)
  • [lfe_lib.txt]!(doc/lfe_lib.txt)
  • [lfe_macro.txt]!(doc/lfe_macro.txt)

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

  • [Updating LFE Documentation]!(doc/src/updating_docs.md)

LFE on Slack, join by requesting an invite here

LFE Forum - Erlang Forums

Steps:

  1. Update the version in src/lfe.app.src
  2. Create the release tags
  3. Create a release on Github
  4. Publish to hex.pm

Once the app.src has been updated with the version for the release, you can create and push the tags (to Github) with the following:

Terminal window
make tags

That will create the number-only version as well as the “v”-prefixed version.

For now, the process of creating a release on Github is manual:

  1. Go to https://github.com/lfe/lfe/releases
  2. Click “Draft new release”
  3. Select the correct tag from the drop-down “Choose a tag”
  4. Click “Generate release notes”
  5. Click “Publish release”

Lastly, to publish LFE to hex.pm, you need to have rebar3 installed on our system and an entry for the hex plugin in your system rebar.config file. With that in place, publish a new release to hex.pm requires only the following:

Terminal window
make publish