|
|
|
|
|
by Paradigma11
4437 days ago
|
|
I disagree. I can only talk about f# but for me the comprehension syntax is mostly an aesthetic choice:
[1..100] |> List.filter (fun e -> e % 2=0)
|> List.map (fun e -> e * 2)
or:
[for e in 1 .. 100 do
if e % 2=0 then
yield e * 2] Personally i prefer the first one since it's compositional and more like a dataflow. But i am not familiar with Scala so maybe i am missing something. |
|