Fold for cheap pattern-matching
More from ring.muhokama.fun
This article is an attempt to present the reasons why I chose OCaml and why I am satisfied with it, for both personal and professional projects.
Summary of a response about how to order products by their votes/reviews using rank aggregation (using Shopify approach).
This article presents the use of the destruct command in Merlin and OCaml-lsp to generate missing patterns, or to specify patterns in pattern matching.
In this article, we're going to look at how generalised openings can be used to reproduce a common practice in other languages, which I call, somewhat pompously, import strategies,
Guarded methods allow constraints to be attached to the receiver (self) only for certain methods, so that these methods can only be called if the receiver satisfies these constraints (these guards). OCaml does not syntactically allow this type of method to be defined directly. In this note, we'll look at how to encode them using a type equality...