Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wrapping my head around OCaml

I'm only a novice programmer (I do it for fun) and I'm coming from the world of Python/C++/other procedural languages, and procedural style of problem solving. I fell in love with OCaml's simplicity after being boggled by its functional style for about a week. Since I'm not an engineer or mathematician, what are some helpful books or resources that will help transform my though process to think more functionally? Just standard exercises or are there books that will help me to think in those terms?

like image 900
not-too-smatr Avatar asked Apr 14 '09 14:04

not-too-smatr


3 Answers

I'm a big fan of "The Little MLer" the ML version of "The Little Schemer" (nee "The Little Lisper") The entire book is in question answer format, leading you through the language.

The big disadvantage is that it doesn't really cover (IIRC) the 'O' part of OCaML... but it covers the ML part really well...

like image 150
Brian Postow Avatar answered Sep 20 '22 05:09

Brian Postow


'Introduction to Objective Caml' by Jason Hickey provides a good introduction to OCaml, and is available online: http://files.metaprl.org/doc/ocaml-book.pdf

like image 44
danieldk Avatar answered Sep 21 '22 05:09

danieldk


It's not specific to OCaml, but if you want to learn to think in a functional way, a great place to start is with John Hughes's paper Why Functional Programming Matters.

like image 36
Norman Ramsey Avatar answered Sep 19 '22 05:09

Norman Ramsey