I'm currently attempting to learn Ocaml, and I'm working thought the Project Euler problems to do so. Here's some code I knocked together for problem 10 (* The sum of the primes below 10 is 2 + 3 + ...
In other languages, I prefer to arrange source files so that simpler and more widely useful concepts are introduced before implementation details, and I try where possible to make complex ...
let binsearch ~arr ~cmp x = ( let cmpx = cmp x in (* Assuming arr is ordered according to cmp, then (bs min max) is an *) (* index of a value v in arr such that ((cmp x value) = 0) ...
I'm pretty new to OCaml, so any feedback is appreciated. The goal is to implement a trie that efficiently stores and sorts strings. module CharMap = Map.Make(Char) (* count of members of the set ...
Defines a simple module for timeoutable computations, with the ability to return arbitrary intermediary results on timeout or the final value otherwise. It also allows default return values. The ...