Blog
The OCaml Planet RSS
Articles and videos contributed by both experts, companies and passionate developers from the OCaml community. From in-depth technical articles, project highlights, community news, or insights into Open Source projects, the OCaml Planet RSS feed aggregator has something for everyone.
Source
Keyword
Year
Author
Want your Blog Posts or Videos to Show Here?
To contribute a blog post, or add your RSS feed, check out the Contributing Guide on GitHub.
In my OCaml project, I’d like to abstract away the details of running containers into specific modules based on the OS. Currently, I have working container setups for Windows and Linux, and I’ve haphazardly peppered if Sys.win32 then where I need differentiation, but this is OCaml, so let us use functors!
OCaml is famous for allow you to do a lot of things like modules. Like really a lot! Advanced features like functors, aside, it’s really common to either alias module names to something shorter or localize open Module_name to a smaller scope:
One of the things that bothered me initially in OCaml was the poor support for working in regular expressions in the standard library. Technically speaking, there’s no support for them at all!
I like OCaml and this is why
(fun x -> Printf.printf "%s %S" x x) "(fun x -> Printf.printf \"%s %S\" x x)"
Quoting According to the lexical conventions of OCaml, characters different from \ and " can be enclosed in sing...
Suppose you're on a game show, and you're given the choice of three doors : Behind one door is a car; behind the others, goats. You pick a d...

