Not a language, but a language feature: in Elixir, there’s a capture operator & that will wrap functions in an anonymous function and also can be used to refer to the nth argument of a function. For example:
add_one = fn x -> x + 1 end
is replaced by
add_one = &(&1 + 1)
This helps avoid naming arguments unnecessarily.
This is one of the features inspired by Clojure. In Clojure, #(foo %) is short for (fn [x] (foo x))
You also have %1, %2 etc. in Clojure.
There’s also the pipe operator |> which passes the result of the expression on the left side as the first argument of the function on the right.
Scala also has _, which in _ + 1 is an alias for x => x + 1, or in the case of f(_), is an alias for x => f(x). Oleg Kiselyov has an interesting take on it.
_ + 1
x => x + 1
x => f(x)
I’m not that familiar with Elixir (only having done a few basic distributed algorithms in it), but this feature has piqued my interest even further in the language, thanks for the handy tip!