There are 2 because JavaScript has 2 different structures for making functions; function expressions (which I chose "lambda" for) and function declarations (which I chose "function" for). See https://github.com/anko/eslisp/blob/master/doc/basics-refere... for examples.
Function declarations are statements, and you need to provide a name for the function.
Function expressions are expressions, and the name is optional.
In practice they often end up being interchangeable, but I just wanted to make sure any JavaScript is definitely representable.
I'm not against the concept of lambdas (obviously, I love them since I made a scheme dialect with them for video editing). The word today is too specific for a plethora of subtly different representations/implementations of the "lambda" of "lambda calculus".
If "lambda" is supposed to mean "function", choose "function". No harm done.
Anonymous function:
(fn [a] ... a)
And lambda:
#(... %)
I don't think this is official nomenclature, but I've been using that to distinguish between both syntaxes.
In truth though, anonymous functions is the more accurate terminology, because lambdas are actually not functions, they're supposed to curry and use term substitution. Where as most programming languages use anonymous functions, which support multi-arity and sometime even variadic arity, and don't use term substitution, but more common argument binding.
(map (fn first-or-last [x]
(or (first x) (last x))
my-seq)
(Of course the name has no semantic effects as you can't refer to it from code, but it's there in debugging / stack traces and serves as a comment for the reader).(I spent a bunch of time trying to sort this terminology when writing the book.)
That said, I don't really know if I'd agree that it's archaic, just less common. Python being an extremely popular language that uses it explicitly (as you say) makes it hard to really suggest that it's archaic.
First paragraph here uses both. I suspect that they use closure throughout the rest of the article, but the fact that they feel the need to reference the other name shows that lambda is still in common currency.