Glider from the game of Life, rising from the left




Topic: #functional-programming

The Sieve of Eratosthenes, Imperatively and Functionally


An advocate of functional programming walks through several implementations of the Sieve of Eratosthenes. The first is a typical implementation using the imperative model of computation, but the rest use higher-order functions and other apparatus of the functional model with varying degrees of success.

I enjoyed reading through the various approaches and thinking about their strengths and weaknesses, but it was a little surprising to see that, even though all of his implementations were written in Java, he never considered any implementation that used the object-oriented model of computation in any significant way.

“The Functional Style — Part 4: First-Class Functions II: Filter, Reduce and More”
Richard Wild, Codurance: Craft at Heart, September 19, 2018

#functional-programming #models-of-computation

Hashtag index

This work is licensed under a Creative Commons Attribution-ShareAlike License.

Atom feed

John David Stone (

created June 1, 2014 · last revised December 10, 2018