Abstract

Intermediate data structures are widely used in functional programs. Programs which use these intermediate structures are usually a lot easier to understand, but they result in loss of efficiency at run-time. In order to reduce these run-time costs, a transformation algorithm called deforestation was proposed by Wadler which could eliminate intermediate structures. However, this transformation algorithm was formulated only for first order functional programs. In this paper, it is shown how the original deforestation algorithm can be extended to deal with higher order functional programs. A treeless form of higher order expression is defined which creates no intermediate structures. Higher order treeless form is an easily recognised form of expression, and any function definition can easily be generalised so that it is in this form. It is shown that the higher order deforestation algorithm will terminate if all function definitions are in this form. This algorithm is then compared with related work.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.