(defmodule leap
(export (leap-year 1)))
(defun leap-year
([year] (when (=:= (rem year 400) 0))
'true)
([year] (when (=:= (rem year 100) 0))
'false)
([year] (when (=:= (rem year 4) 0))
'true)
([_]
'false))
Lisp Flavoured Erlang (AKA LFE) is a lisp syntax front-end to the Erlang compiler. Code produced with it is compatible with "normal" Erlang code. LFE is a (proper) Lisp based on the features and limitations of the Erlang VM.
LFE has many origins, depending upon whether you're looking at Lisp, Erlang, or LFE-proper. The LFE community of contributors embraces all of these and more.
LFE is a Lisp-2. In Lisp-2, the rules for evaluation in the functional position of a form are distinct from those for evaluation in the argument positions of the form. In addition, LFE not only has separate value and function space but also allows multiple function definitions for the same name, as Erlang does.
Join the LFE trackThe reviews are incredibly helpful because they help me see things that I missed, learn about new ways and sometimes interesting discussions that can add a fun twist to maybe a simple problem.
These are a few of the 31 exercises on the LFE track. You can see all the exercises here.