Intermediate
Compilers & Programming Language Theory
Q57 / 100
What is deforestation in functional programming compilation?
Correct! Well done.
Incorrect.
The correct answer is B) An optimization eliminating intermediate list/tree structures produced by function composition, fusing list transformers like map and filter into a single pass
B
Correct Answer
An optimization eliminating intermediate list/tree structures produced by function composition, fusing list transformers like map and filter into a single pass
Explanation
Deforestation (Wadler 1988): map f . filter p . map g → single traversal without intermediate lists. Stream fusion in GHC: build/foldr or stream/unstream pairs enable the GHC optimizer to fuse pipelines automatically.
Progress
57/100