%0 Journal Article %J SIGPLAN Notices %D 2005 %T Recursion Patterns and Time-analysis %A Manuel Bernardo Barbosa %A Alcino Cunha %A Jorge Sousa Pinto %I ACM %N 5 %P 45–54 %V 40 %X

This paper explores some ideas concerning the time-analysis of functional programs defined by instantiating typical recursion patterns such as folds, unfolds, and hylomorphisms. The concepts in this paper are illustrated through a rich set of examples in the Haskell programming language. We concentrate on unfolds and folds (also known as anamorphisms and catamorphisms respectively) of recursively defined types, as well as the more general hylomorphism pattern. For the latter, we use as case-studies two famous sorting algorithms, mergesort and quicksort. Even though time analysis is not compositional, we argue that splitting functions to expose the explicit construction of the recursion tree and its later consumption helps with this analysis.

%> https://haslab.uminho.pt/sites/default/files/alcino/files/recpta.pdf