Definition: A monorepo is a standard Version Control System, or VCS (such as Git, Subversion or CVS) repository, which instead of containing just one application or unit of software (applications, libraries, micro services, modules…), contains all the components that a project (or company) needs to operate.
At first glance, it sounds counterintuitive to host more than one unit of software in a single repository, but there are few advantages on having all components stored in the same place:
Function composition is one the key features (among others) of functional programming. Programming languages that offer higher order functions as a feature can potentially use function composition. But, still, programmers need to be aware of some key concepts to successfully apply this pattern in our code.
Function composition, as defined on Wikipedia, is an act or mechanism to combine simple functions to build more complicated ones. In other words, we can define new functions, equivalent to the result of chaining a set of given functions, so the input of function i is the output (or result) of function i-1.
The way you structure your code is a key factor when you define your source code organization. It will make your life easier or miserable, and once this structure is established it will become a really tedious task to redefine it. That’s why you know about the different patterns available and choose the one fits your project best.
But, why should I care about modules? Well, is the way Javascript offers to organize and encapsulate your code, and if you don’t think you need to do it, because maybe it’s a small project or you don’t care at all, trust me, you are making a huge mistake!