|Trancón y Widemann, B: The Recursion Schemes of Scientific Models A Multi-Paradigm Study of the Logistic Map in Haskell, Post-Proceedings 1st International Workshop on Trends in Functional Progamming in Education (2012)|
The Squiggol approach to recursive algorithms separates computation and recursion scheme. We revisit the idea in a setting of simple but paradigmatic problems in scientific, particularly ecological, modelling. It is demonstrated that each stereotypic modelling task corresponds to a simple and well-understood recursion pattern, and vice versa. The logistic map is used as the running example of a scientific model. The Haskell implementation of the recursion framework and its applications is discussed. Its benefits from the perspective of application, compared with a previous set-theoretic presentation, are numerous: Static typing and higher-order functions promote abstraction and reuse, whereas immediately executable models make interactive approaches, adequate for modelling living systems, easy and convenient. From the perspective of functional programming, the general logic of scientific modelling is summarized in a concise and familiar language, blazing the trail for truly functional, real-world, non-number-crunching, scientific computing. The material presented here can be and has been used to instruct prospective natural scientists on mathematics they are usually not tought, but which are indespensable for understanding the logic of models, most notably recursion theory. It can also be used to demonstrate to functional programmers the deep and scarcely recognized empirical and epistemological implications of both dedicated simulation programs and very abstract formal algorithms.