3 ms·
IMHO the key to legible comprehensions is to use them only to express composition and to put the logic into verbosely named functions. Chained pipelines (`foo.
by maxbond 4y ago
IMHO the key to legible comprehensions is to use them only to express composition and to put the logic into verbosely named functions.
Chained pipelines (`foo.filter(...).map(...)`) are fine to me, certainly more verbose then comprehensions for better & worse, but I get lost in pipelines expressed as nested functions (`map(filter(a, ...), ...)`).