id | keywords | name | summary | category | |
---|---|---|---|---|---|
module |
| module | This is the `module` keyword. | languageconstructs |
module
is used to define a scoped block of code that may contain types, let
bindings, nested modules, etc.
<CodeTab labels={["ReScript", "JS Output"]}>
modulePoint3D= { typepoint= (float, float, float) letmake= (x, y, z) => (x, y, z) } letorigin=Point3D.make(0.0, 0.0, 0.0)
functionmake(x,y,z){return[x,y,z];}varPoint3D={make: make,};varorigin=[0.0,0.0,0.0];