Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
422572 | Electronic Notes in Theoretical Computer Science | 2011 | 22 Pages |
Abstract
In our paper we deal with the expressing of recursion and corecursion in functional programming. We discuss about the morphisms which express the recursion or corecursion, respectively. Here we consider especially the catamorphisms, anamorphisms and their composition called the hylomorphisms. The main essence of this work is to describe a new method of programming the function for calculating the factorial by using hylomorphism. We show that using of hylomorphism is an alternative method for the computation of factorial to recursive methods programmed classically. Our new method we describe in action semantics which is a new formal method for the program description.
Related Topics
Physical Sciences and Engineering
Computer Science
Computational Theory and Mathematics