"f of x for all x in set s where predicate p holds"
[ f(x) for x in s if p(x) ]
is easier for me to read in python (and english) than
"the composition of map with f and filter with p, applied to set s"
map(f, filter(p, s))
Guido makes similar arguments: https://www.artima.com/weblogs/viewpost.jsp?thread=98196
is comprehension syntax always easier than composition, or is it just our familiarity?
will the same code in idiomatic haskell eventually become as effortless to think about as the list comp is for me in python?
@pho4cexa Won't do scheme off the top of my head but in common lisp the LOOP macro allows things like:
(loop for x in xs
when (predicate x)
collect (function x))
Some folks use a 3rd party lib called Iterate because LOOP "doesn't feel lispy" syntactically.
But hey, it's in the standard! Along with so many other wild things. You can really tell that CL is a committee/political artifact but I find that endearing. The "archaeologist" side of me I suppose. :)