(no title)
cobby | 4 years ago
I know there is a `collect` macro in `sugar` module but it is nowhere close to the python comprehensions. The code is too verbose and basically is just the same multiline for loop :-(
cobby | 4 years ago
I know there is a `collect` macro in `sugar` module but it is nowhere close to the python comprehensions. The code is too verbose and basically is just the same multiline for loop :-(
budafish|4 years ago
[x.name for x in someList if x.age > 5]
Is the same as:
x.filterIt(it.age > 5).mapIt(it.name)
In a way it reads better.