[Haskell-cafe] A functional programming solution for Mr and Mrs Hollingberry

Andreas Pauley apauley at gmail.com
Sun May 20 19:33:13 CEST 2012


Hi all,

I'm in the process of learning how to approach problems from a
functional perspective, coming from an Object Oriented background
(mostly Smalltalk).

One of the general concerns/questions raised when talking to people in
a similar position is:
"How do I design/model a problem when I don't have my trusted classes
and objects available?"

With this in mind I've created a programming exercise where I imagine
an OO programmer would use an object hierarchy with subtype
polymorphism as part of the solution. And then I'd like to compare
functional implementations of the same problem:

https://github.com/apauley/HollingBerries

I want to see how elegant a solution I can get in a functional
language, given that the problem description is not really elegant at
all. It has a few annoying exceptions to the normal rules, typical of
what one might get in a real specification from some client.

Currently there are 3 implementations:
 - one in Erlang, my attempt at implementing a functional solution
 - one in Ruby, my attempt to see how an object hierarchy could be used
 - one in Clojure, done by one of the people in our FP user group [1]

I would love to include some Haskell implementations as well, if any
of you are interested.

Kind regards,
Andreas Pauley

1. http://www.meetup.com/lambda-luminaries/

-- 
http://pauley.org.za/
http://twitter.com/apauley



More information about the Haskell-Cafe mailing list