Posts Tagged ‘included’

Using OCaml’s module functors to provide monadic contexts for Batteries

Hi,
Several days ago, bluestorm and I started working on monads-related stuffs for Batteries, so that we’d be able to provide a good API for writing and using monads in Objective Caml.
Well, we’ve now written the basis of the future monad-related functions and modules in Batteries.
Of course, we’ve introduced two key monads, keeping Batteries’ spirit : [...]


Who thought OCaml was dead ?!

Hi,
I’m writing this post because I want to thank and encourage the OCaml community. Indeed, there are many really *great* news this week that you may have seen if you read either Planet OCaml(Core), the Caml mailing list or both.
OCaml and Debian — The first one is a very good one for making OCaml more [...]


Diving into Batteries #2 : Heavyweight strings

Today, we’ll give a whirl at the Rope module of OCaml Batteries Included.
What are ropes ?
Ropes are better strings (but heavyweight) :

The length of a rope can be determined in constant time
appending or prepending a small rope to an arbitrarily large one in amortized constant time
concat, substring, insert, remove operations in amortized logarithmic time
access [...]