3 ms·
This is so very Perl. I guess this is Perls answer to list comprehensions.
by 1ris 11y ago
This is so very Perl. I guess this is Perls answer to list comprehensions.
- koenigdavidmj 11y agoI would assume that it has those too. Due to the main implementation being Pugs for a while, the language absorbed a lot of Haskellisms (chiefly laziness).
- kbenson 11y agoThat's interesting, I always figured Python's list comprehensions where their answer to Perl's map and grep. But in direct answer to your question, no, but it's part of the answer[1]. 1: https://en.wikipedia.org/wiki/List_comprehension#Perl_6 https://en.wikipedia.org/wiki/List_comprehension#Perl_6
- dragonwriter 11y agogather/take is more the general Perl 6 take on list comprehensions.