4 ms·
Are you implying it's complex? Because a lot of languages have list comprehensions[1] (list comprehensions are awesome!). Haskells is very close to the mathmati
by Tehnix 13y ago
Are you implying it's complex? Because a lot of languages have list comprehensions[1] (list comprehensions are awesome!). Haskells is very close to the mathmatical set-builder notation[2].
An example of a more advanced one would be
>> [2*x | x <- [0,1..25], x^2 `rem` 3 == 0]
[0,6,12,18,24,30,36,42,48]
Also, there is HLint for Haskell linting purposes...
[1] http://en.wikipedia.org/wiki/List_comprehension#Examples_in_different_programming_languages http://en.wikipedia.org/wiki/List_comprehension#Examples_in_...
[2] http://en.wikipedia.org/wiki/Set-builder_notation#Parallels_in_programming_languages http://en.wikipedia.org/wiki/Set-builder_notation#Parallels_...