R is a Functional Programming Language

A write-up by Hadley Wickham shows the aspects of Functional Programming in R. It’s a great article for understanding both R and using functions as the core of operations in R. Three building blocks are explained:

 1. Anonymous functions

 2. Closures (functions written by functions)

 3. Lists of functions.

 

Resources to Learn Haskell

Getting started

  • Learn you a Haskell. LYAH is easy to read cover to cover and is more about teaching language features rather than solving real world problems (i.e. it doesn’t spend too long on IO).
  • The Haskell Book is a good source to start your learning. It’s designed for programmers new to FP. Very easy to understand.
  • cis194 spring 2013. More rigorous approach than Learn you a Haskell, it is also a little bit less accessible due to the fact that it is intended to be presented in a classroom where students can ask questions.
  • Real World Haskell. RWH on the other hand is better for just dipping into the odd chapter but it is really useful for more advanced topics that crop up in the real world; it proved particularly useful for example with profiling/fixing memory leaks, learning about Haskell’s concurrency model and error handling.
  • Try Haskell is an online interactive Haskell tutorial which makes it easier to follow along.

Exercises

References

  • Hoogle is by far the best tool to look up anything Haskell related, even type signatures! Blog post
  • What I wish I knew when learning Haskell is a good read once you’ve read the above literature.

Community

  • As far as community goes, there are IRC channels such as #haskell-beginners, the Haskell subreddit and there are also tons of meetups which are great for face-to-face conversations, experience sharing, etc. Covering all the material above will take a while, but do not give up. Your efforts will be truly worth it. Last but not least, the Haskell community is incredibly nice, welcoming, and helpful. And they are very smart. In fact, we received incredibly valuable feedback from the last blog posts we published on the subject.

To summarise

  • Read Learn you a Haskell cover to cover.
  • Dip in and out of Real World Haskell as and when necessary.
  • Read Chris Allen’s recommended path to learning Haskell.