...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!
You are at the home page of 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 coexists seamlessly with vanilla Erlang and OTP. As such, code written in LFE can freely be used together with modules written in vanilla Erlang and applications in Erlang/OTP.
Below are a selection of code samples representing features available in LFE. There's much more to see, though -- so don't forget to visit the Docs page!
Records are very simple in LFE. They are created with the defrecord
form
like so:
For more information, see the tutorial on LFE records.
The power of Erlang's pattern matching is available in Lisp form:
For more information, see the User Guide as well as the tutorial on pattern matching.
Here are a couple example LFE macros:
Note that the functionality represented by the LFE code above was implemented internally in Erlang, not in LFE itself.
For those that can't wait, here's an example client/server in action:
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.
Enjoy!