Using LFE

Reference materials, tooling, and practical resources for working LFE developers.

Development environment

# In a project directory (Erlang 21+ and rebar3 required):
$ rebar3 lfe repl

# From the LFE source repo:
$ make && ./bin/lfe

# No install needed:
$ docker run -it lfex/lfe

Once in the REPL, (help) prints available commands and double-tap <TAB> after a module prefix (e.g., (lists:) lists its exported functions.

Language reference

OTP reference

The modules you'll reach for every day.

;; Calling into OTP is just calling Erlang modules:
lfe> (application:which_applications)
((lfe "Lisp Flavoured Erlang" "2.1.4")
 (compiler "ERTS  CXC 138 10" "8.4.1")
 (kernel "ERTS  CXC 138 10" "9.2.1")
 (stdlib "ERTS  CXC 138 10" "5.2.1"))

Ecosystem & interop

LFE calls Erlang modules directly — no wrappers, no FFI, no overhead.

;; Any Erlang library is an LFE library:
lfe> (lists:reverse
       (erlang:integer_to_list
         (lists:foldl #'*/2 1 '(1 2 3 4))))
"42"

Deployment