Looking for a small project to do as an introduction to functional programming
I've been reading up on functional programming a lot recently, and I finally decided that the best way to understand it is pro开发者_开发问答bably just to start using it. I spent some time looking at different reviews of functional languages, and I think I've settled on Haskell because of its supposed elegance and the fact that it seems to be the go-to pure functional language. Most recently I've been coding in Java, Python, and Perl, so I figure for this exercise I might as well pick a language that forces me to only use functional programming ideas rather than something like Scala or Lisp that also supports imperative programming (but if anyone has thoughts or opinions about this, I'd love to hear them).
Anyway, the whole point for learning the ideas of functional programming (for me at least) is that I've always heard that some problems are more naturally solved in that way. And I've always found that it's better to learn new things by applying them somehow rather than just going through mindless tutorials. So, that being said, what are some straightforward problems/projects that I can do to learn the essence of functional programming?
Try working through the Project Euler challenges. They get harder as you go, so tackling them one by one from a functional programming point-of-view would probably be a very good way of learning.
精彩评论