February 05, 2008, at 11:08 PM

20080205

Turning 35 today and I am indulging in my love of learning. This time OCAML is the culprit! Bear in mind I don't remember ever doing FP in the past.

I am slowly going through the OCAML Tutorial. Yesterday I encountered my first hurdle ...

let rec length_aux len = function
    [] -> len
  | a::l -> length_aux (len + 1) l

let length l = length_aux 0 l

... typical recursive pattern in FP Slawek told me. I was struggling with the incomplete signature (I was seeing length_aux as defined as taking one argument but being called with 2 in length_aux and in length).

I have reached the recursion chapter (I must admit I went over the functors section quickly :P) ... so far I feel very stupid :(

Arnaud mentioned he had a book in about OCAML that I could borrow. He also said that Scala is more hype and Haskell is more fun ... I like Python (going to bed now ;).

blog comments powered by Disqus