Hi,

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 signatures?

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.

Thanks,
Levi
lstephen.wordpress.com

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to