Pronouncing `<-`

Learn You Some Erlang: List Comprehensions uses “in” - and it does set up the association between ∈ and <- though it isn’t explicit about. Personally I’ve always pronounced ∈ as “element of”.

Designing for Scalability with Erlang/OTP p.27

The effect of this is to successively bind the variable X to the values 2, 3, 5, 7, and 11. In other words, it generates the elements from the list: the symbol <- is meant to suggest the “element of” symbol for sets, ∈.

Erlang Programming - A Concurrent Approach to Software Development p.198

Generators
A generator has the form Pattern <- List, where Pattern is a pattern that is matched with elements from the List expression. You can read the symbol <- as “comes from”; it’s also like the mathematical symbol ∈, meaning “is an element of”.

3 Likes