[Haskell-cafe] FP design

Levi Stephen levi.stephen at optusnet.com.au
Mon Nov 5 19:02:49 EST 2007


I'm was wondering how most people work during when designing a functional 
program. Do you create data structures/types first? Do you work from some type 

For example, take a blog. Is the first step likely to be something like:

data BlogEntry = BlogEntry { title::String,content::String,comments::[Comment] }
type Blog = [BlogEntry]

or more likely thinking about what functions will be required:

addEntry :: BlogEntry -> Blog -> Blog
displayBlog :: Blog -> HTML
displayEntry :: BlogEntry -> HTML

I'm trying to get my brain out of thinking OO thinking more functionally.


More information about the Haskell-Cafe mailing list