Adds assignments Pattern = Expression
to comprehension qualifier lists.
3 Likes
This is very nice! I just checked (because I remembered needing this), we have plenty of really short lists:map
or lists:filter
, that would be well suited for comprehensions where it was too annoying to write the filter or result as an express (esp. records).
Oh!
[Z || X <- Ls,
is_tuple(Y = g(X)),
Z <- f(Y, h(element(2,Y)))].
All these years and I’m still learning new tricks