
7 Dec
2021
7 Dec
'21
10:37 p.m.
On Tue, Dec 07, 2021 at 09:46:48PM -0500, Albert Y. C. Lai wrote:
Level 1: ... Level 2: ... Level 3: ...
And we haven't even touched either of: {-# LANGUAGE ParallelListComp #-} {-# LANGUAGE TransformListComp #-} or the fact that in the dependent case, we might not output anything that feels like a product: concat :: [[a]] -> [a] concat xss = [ x | xs <- xss, x <- xs ] So indeed list comprehensions are products in the simplest cases, and do generate nested loops under various conditions, but they're considerly more flexible. -- Viktor.