Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a26219e42dcfada9

Jump to content

// Workers AI · dad joke modeWhy did deforestation go to therapy? It had a lot of tree-mendous data issues.

From Wikipedia, the free encyclopedia

In the theory of programming languages in computer science, deforestation (also known as fusion) is a program transformation to eliminate intermediate lists or tree structures that are created and then immediately consumed by a program.

The term "deforestation" was created by Philip Wadler, originally in his 1990 paper "Deforestation: transforming programs to eliminate trees".[1]

Deforestation is typically applied to programs in functional programming languages, more so non-strict programming languages such as Haskell. One algorithm for deforestation, named shortcut deforestation,[2] is implemented in the Glasgow Haskell Compiler.[3] Deforestation is closely related to escape analysis.

See also

[edit]

References

[edit]
  1. Wadler, Philip (1990). "Deforestation: transforming programs to eliminate trees". Theoretical Computer Science. 73 (2): 231–248. doi:10.1016/0304-3975(90)90147-A.
  2. Gill, Andrew; Launchbury, John; Peyton Jones, Simon (1993). "A short cut to deforestation" (PDF). Proceedings Conference on Functional Programming Languages and Computer Architecture. pp. 223–232. doi:10.1145/165180.165214.
  3. Peyton Jones, Simon; Tolmach, Andrew; Hoare, C.A.R. (2001). "Playing by the rules: rewriting as a practical optimization technique in GHC" (PDF). Proceedings ACM/SIGPLAN Haskell Workshop.