4 ms·
No. A functional language is a language that primarily uses functions as defined in mathematics for it's programming language. Functions defined in mathematics
by corethree 3y ago
No. A functional language is a language that primarily uses functions as defined in mathematics for it's programming language. Functions defined in mathematics are single lined expressions where no mutation takes place.
In traditional languages programs are a list of procedures that change and mutate state.
A list comprehension is functional in every way as it is a single expression. It does not change state. It is functionally equivalent to map and filter and even flatmap.
If you need an official source you just need to know that list comprehensions are borrowed from haskell. That's where the term came from and that's where the feature was borrowed from.