Programming in the λ-calculus: From church to scott and back

11Citations
Citations of this article
3Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Although the λ-calculus is well known as a universal programming language, it is seldom used for actual programming or expressing algorithms. Here we demonstrate that it is possible to use the λ-calculus as a comprehensive formalism for programming by showing how to convert programs written in functional programming languages like Clean and Haskell to closed λ-expressions. The transformation is based on using the Scott-encoding for Algebraic Data Types instead of the more common Church encoding. In this way we not only obtain an encoding that is better comprehensible but that is also more efficient. As a proof of the pudding we provide an implementation of Eratosthenes' prime sieve algorithm as a self-contained, 143 character length, λ-expression. © 2013 Springer-Verlag Berlin Heidelberg.

Cite

CITATION STYLE

APA

Jansen, J. M. (2013). Programming in the λ-calculus: From church to scott and back. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 8106, pp. 168–180). Springer Verlag. https://doi.org/10.1007/978-3-642-40355-2_12

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free