The Mesh Engine should have a standard library which is implicitly loaded (i.e.: opened) before each new Mesh expression. The standard library should be defined as a Mesh module. However, most functions in the stdlib would be defined as external.
Example
The following is an example of what a first version of the standard library could look like:
module Stdlib = {
external cons = "stdlib_cons";
let (|>) = (x, f) => f(x);
external add = "stdlib_add";
external sub = "stdlib_sub";
external mul = "stdlib_mul";
external div = "stdlib_div";
let (+) = app;
let (-) = sub;
let (*) = mul;
let (/) = div;
};
Description
The Mesh Engine should have a standard library which is implicitly loaded (i.e.: opened) before each new Mesh expression. The standard library should be defined as a Mesh module. However, most functions in the stdlib would be defined as
external
.Example
The following is an example of what a first version of the standard library could look like: